469,592 Members | 1,813 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,592 developers. It's quick & easy.

Controling font size in input fields

Does anyone know how to make input fields smaller, using a smaller
font? I want to know how to make my textboxes and such like the ones
at http://www.gracenote.com/music/ , but reading teh code reveals they
used a stylesheet to do this, and the stylesheet is not within the
public_html directory tree. Does anyone know how to do that in CSS or
HTML?

Again, it's the style at http://www.gracenote.com/music/ .
Jul 20 '05 #1
6 20467
Liam Gibbs wrote:
Does anyone know how to make input fields smaller, using a smaller
font? I want to know how to make my textboxes and such like the ones
at http://www.gracenote.com/music/ , but reading teh code reveals they
used a stylesheet to do this, and the stylesheet is not within the
public_html directory tree. Does anyone know how to do that in CSS or
HTML?


AFAIK if your browser can read the style sheet, you can.

John

--
email: mail(at)johnbokma.com (or reply) home: http://johnbokma.com/
Web site hints: http://johnbokma.com/websitedesign/ ~ ICQ 218175426

Jul 20 '05 #2
li***************@yahoo.com (Liam Gibbs) writes:
Does anyone know how to make input fields smaller, using a smaller
font? I want to know how to make my textboxes and such like the ones
at http://www.gracenote.com/music/ , but reading teh code reveals they
used a stylesheet to do this, and the stylesheet is not within the
public_html directory tree.
Um, yes it is, or how could your browser read it:
http://www.gracenote.com/style/ie.css
http://www.gracenote.com/style/ns.css
http://www.gracenote.com/style/mac.css
Does anyone know how to do that in CSS or
HTML?


input { font-size: 90%; }

This had better be for a user stylesheet, because it's an extremely
bad idea for an author stylesheet.

--
Chris
Jul 20 '05 #3
li***************@yahoo.com (Liam Gibbs) wrote:
Does anyone know how to make input fields smaller, using a smaller
font?
In HTML, you could try <small>...</small> or <font size="2">...</font>
around them. Browsers mostly ignore that, but that's what you can try
in HTML. The rest is not HTML, hence off-topic here.
I want to know how to make my textboxes and such like the
ones at http://www.gracenote.com/music/
You really do? That is, you would like to make the text size 11 pixels
even if such a size is completely unreadable to the user? Why? If your
design requires that, then the design is the problem.
but reading teh code
reveals they used a stylesheet to do this, and the stylesheet is
not within the public_html directory tree.


Whether they have anything like public_html is both invisible and
irrelevant to use.

The style sheets are accessible as Web resources, with URLs, but I'm
afraid that if told you how, I would also have to... tell you
that they're all wrong and should _not_ be used as examples.
(Look at the HTML source. Pick up the URL of the JavaScript code for
loading a style sheet - they use childish client-side "browser
sniffing". Use a browser that lets you access that URL without
executing the JavaScript code - Lynx will do fine, for one - and look
at the code, and pick up the style sheet you are interested in, like
http://www.gracenote.com/style/ie.css )

Text input size should _not_ be reduced. What might make a lot sense is
input { font-size: 100%; }
in a style sheet, since several browsers use a smaller font for input
elements than for copy text.

Surely the font size selected by the user for normal reading is best
for text input too - if some adjustment is needed, it should be in the
direction of making input text _bigger_ (since it's important to the
user and must be very legible, down to checking it in detail before
submitting).

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #4
<<Um, yes it is, or how could your browser read it:>>

True enough. Must have been on crack.

<<In HTML, you could try <small>...</small> or <font
size="2">...</font> around them. Browsers mostly ignore that, but
that's what you can try in HTML. The rest is not HTML, hence off-topic
here.>>

No, I'm not looking to use the FONT tag with this, since FONT is
deprecated.

<<You really do? That is, you would like to make the text size 11
pixels even if such a size is completely unreadable to the user? Why?
If your design requires that, then the design is the problem.>>

No, I don't want to specify the font size in pixels, but in
percentage. I know specifying in font size is a bad idea because it
disallows resizing. I just want to know how to make the textboxes and
such smaller by percentage.

I'm not being paid, nor making money on something like this. There is
no client taking a look at it, but I'd like to experiment and play
around. I'm not worried at this point about accessibility and such.
Jul 20 '05 #5
li***************@yahoo.com (Liam Gibbs) wrote:
I just want to know how to make the textboxes and
such smaller by percentage.
You mean even smaller than by default?
I'm not worried at this point about accessibility and such.


I am; hence I'm not over-enthusiastic to tell you how to do what should
not be done, but I'll still point out that since CSS is the only
feasible way, the discussion would belong to c.i.w.a.stylesheets and
not here.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #6
> > I just want to know how to make the textboxes and
such smaller by percentage.


You mean even smaller than by default?
I'm not worried at this point about accessibility and such.


I am; hence I'm not over-enthusiastic to tell you how to do what should
not be done, but I'll still point out that since CSS is the only
feasible way, the discussion would belong to c.i.w.a.stylesheets and
not here.


Ah. Now I see. The stupid things don't scale properly as I thought
they would. At any rate, what's the problem with a little harmless
teaching? I *am* smart enough not to put bad design on a corporate
site. Anyway, I'm going to move this on over to the CSS group as
suggested. Thx.
Jul 20 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Csaba Gabor | last post: by
16 posts views Thread by maya | last post: by
9 posts views Thread by MadingS | last post: by
17 posts views Thread by teser3 | last post: by
3 posts views Thread by Phil Stanton | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.