This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Stylesheets > April 2007 > CSS & Font Sizes
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| I'm just after a bit of wisdom here.
If I specify something like
body { font-size: 1em; }
is this really the same as
body { font-size: 100%; }
?
Which is preferred, or is it a matter of taste?
And what is the difference between the above and not specifying the
font-size at all?
Thanks
Mark
| |
| Beauregard T. Shagnasty 2007-04-22, 6:18 pm |
| Mark wrote:
> I'm just after a bit of wisdom here.
>
> If I specify something like
>
> body { font-size: 1em; }
>
> is this really the same as
>
> body { font-size: 100%; }
> ?
They give the same result.
> Which is preferred, or is it a matter of taste?
100% is preferred, due to a bug in IE6 and lower (maybe 7 too?) where em
unit will not scale correctly when user changes size (Medium to Large,
etc).
> And what is the difference between the above and not specifying the
> font-size at all?
None, except if you do declare it, you show your intent on being
correct. <g>
--
-bts
-Motorcycles defy gravity; cars just suck
| |
| Bergamot 2007-04-22, 6:18 pm |
| Beauregard T. Shagnasty wrote:
> Mark wrote:
>
>
> None, except if you do declare it, you show your intent on being
> correct. <g>
Also, if you do use em units elsewhere in the stylesheet, IE will give
more predictable results if you set font-size:100% first.
--
Berg
| |
|
| Bergamot wrote:
> Beauregard T. Shagnasty wrote:
>
> Also, if you do use em units elsewhere in the stylesheet, IE will give
> more predictable results if you set font-size:100% first.
>
Thanks for your help. I wasn't aware of the IE bug so that simplifies
things.
Mark
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|