469,613 Members | 1,772 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Default default font size?

I've done a bit of searching, and I can't find the answer to this
question: If you omit the "font-size" property from all of your CSS,
does it default to 100%? Thanks for bearing with a newbie.

Jul 20 '05 #1
8 2180
Tim
On Mon, 20 Sep 2004 22:49:05 -0400,
"Fast Eddie" <ne*******@newsserver.com> posted:
I've done a bit of searching, and I can't find the answer to this
question: If you omit the "font-size" property from all of your CSS,
does it default to 100%? Thanks for bearing with a newbie.


Providing you haven't done anything else to specify a different font size
(font elements, H elements, etc.), then yes.

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.
Jul 20 '05 #2
>> From: Fast Eddie

I've done a bit of searching, and I can't find the answer to this
question: If you omit the "font-size" property from all of your
CSS, does it default to 100%? Thanks for bearing with a newbie.


From: Tim

Providing you haven't done anything else to specify a different font
size (font elements, H elements, etc.), then yes.


My stylesheet, in its entirety, looks like this:

body { font-family: sans-serif; padding: 1%; }
img { border: 0px; }
td { vertical-align: middle; }

..left { float: left; }
..right { float: right; }
..main { clear: both; }

..fixed { font-family: monospace; white-space: pre; }
..nav { font-size: 80%; line-height: 1.5em; text-align: center; }

So it looks like any body text will default to 100%, which is exactly
what I wanted. Thanks for your reply.

Jul 20 '05 #3
On Tue, 21 Sep 2004 10:49:27 -0400, Fast Eddie <ne*******@newsserver.com>
wrote:
From: Fast Eddie

I've done a bit of searching, and I can't find the answer to this
question: If you omit the "font-size" property from all of your
CSS, does it default to 100%?
My stylesheet, in its entirety, looks like this:
...
So it looks like any body text will default to 100%, which is exactly
what I wanted. Thanks for your reply.


Mostly, yes. A few quick cmments.
body { font-family: sans-serif; padding: 1%; }
img { border: 0px; }
While this is not wrong, units are not required when the value is 0.
td { vertical-align: middle; }

.left { float: left; }
.right { float: right; }
.main { clear: both; }
It may be easier if you name the classes according to what it is, rather
than where it goes. Not seeing your page, I cannot make relevant
suggestions.
.fixed { font-family: monospace; white-space: pre; }
.nav { font-size: 80%; line-height: 1.5em; text-align: center; }


Your nav section's font size will be 4/5 of what I prefer to read. In some
environments this will be too small. I'd advise not to do that. Any text
the user needs to be able to read should be rendered at 100%. Save smaller
sizes for legal disclaimers etc. which are not needed for using the site.
Jul 20 '05 #4
From: Neal
From: Fast Eddie

I've done a bit of searching, and I can't find the answer to this
question: If you omit the "font-size" property from all of your
CSS, does it default to 100%?


My stylesheet, in its entirety, looks like this:
...
So it looks like any body text will default to 100%, which is
exactly what I wanted. Thanks for your reply.


Mostly, yes. A few quick cmments.
body { font-family: sans-serif; padding: 1%; }
img { border: 0px; }


While this is not wrong, units are not required when the value is 0.


Good point, and a good reason to purge the dreaded string "px" from my
CSS.
td { vertical-align: middle; }

.left { float: left; }
.right { float: right; }
.main { clear: both; }


It may be easier if you name the classes according to what it is,
rather than where it goes. Not seeing your page, I cannot make
relevant suggestions.


I thought about that before creating the names, but at least for now,
I don't have mental classifications better than "stuff I want on the
left/right of the page". However, I'm still formulating a personal
Web Design Philosophy [tm], so while I'm cogitating and mulling and
scribbling and whatnot, maybe my subconscious will suggest something
better.
.fixed { font-family: monospace; white-space: pre; }
.nav { font-size: 80%; line-height: 1.5em; text-align: center; }


Your nav section's font size will be 4/5 of what I prefer to read.
In some environments this will be too small. I'd advise not to do
that. Any text the user needs to be able to read should be rendered
at 100%. Save smaller sizes for legal disclaimers etc. which are
not needed for using the site.


An interesting point. I understand -- and embrace -- the idea that
users should determine for themselves what font sizes are most
readable. On the other hand, I want my scrawny text navbar to be
visually distinct from the rest of the page, and I'm disinclined to
make it large, bold, or a different font. (I want to keep things
simple, as my almost-null stylesheet suggests.) You've given me more
to think about, though.

Thanks very much for your comments. It turns out that the design of
even simple pages takes a lot of mental effort, and I'm grateful to be
able to draw on the expertise of people who've been down this road.

Jul 20 '05 #5
On Tue, 21 Sep 2004 14:41:22 -0400, Fast Eddie <ne*******@newsserver.com>
wrote:
Thanks very much for your comments. It turns out that the design of
even simple pages takes a lot of mental effort, and I'm grateful to be
able to draw on the expertise of people who've been down this road.


I must say it's refreshing to hear someone take comments in a professional
manner and not respond with whining or defensiveness. And you post inline
too!

I like this guy.

Jul 20 '05 #6
On Mon, 20 Sep 2004 22:49:05 -0400, "Fast Eddie"
<ne*******@newsserver.com> wrote:
I've done a bit of searching, and I can't find the answer to this
question: If you omit the "font-size" property from all of your CSS,
does it default to 100%? Thanks for bearing with a newbie.


For most elements, such as <p> and <div>, yes. For headings each browser
will have its own defaults. And for <pre> elements the browser default
is often around 90% because monospaced fonts have a width quite a bit
more than the average width for typical proportional fonts.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #7
>> From: Fast Eddie

I've done a bit of searching, and I can't find the answer to this
question: If you omit the "font-size" property from all of your
CSS, does it default to 100%? Thanks for bearing with a newbie.

From: Stephen Poley

For most elements, such as <p> and <div>, yes. For headings each
browser will have its own defaults. And for <pre> elements the
browser default is often around 90% because monospaced fonts have a
width quite a bit more than the average width for typical
proportional fonts.


Aha! Good catch. Thanks much.
Jul 20 '05 #8
Neal ne*****@yahoo.com wrote:
On Tue, 21 Sep 2004 14:41:22 -0400, Fast Eddie <ne*******@newsserver.com>
wrote:
Thanks very much for your comments. It turns out that the design of
even simple pages takes a lot of mental effort, and I'm grateful to be
able to draw on the expertise of people who've been down this road.


I must say it's refreshing to hear someone take comments in a professional
manner and not respond with whining or defensiveness. And you post inline
too!

I like this guy.


I'm pleased to see somebody who accepts that the main tool used for web
design is the human brain. An obvious fact that far too many people fail
to grasp.

--
eric
www.ericjarvis.co.uk
http://crimsonautograph.blogspot.com/
"live fast, die only if strictly necessary"
Jul 20 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Isaac Grover | last post: by
55 posts views Thread by Haines Brown | last post: by
54 posts views Thread by Brett Baisley | last post: by
2 posts views Thread by SK | last post: by
4 posts views Thread by JohnSmith90 | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.