![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
My CSS says this: #footer{ color:#888; font-size:20px; } h3{ font-family: Sylfaen, Georgia, "Times New Roman", Times, serif; font-weight:normal; letter-spacing: -1px; margin:0; } This is the only reference to h3 in my CSS file. It is used here: div id="footer" h3> (c) Copyright 2006</h3 /div Unlike all other instances of using px for font-size units, in this one case only, the resulting <h3> is of significantly different size when viewed in Firefox vs. IE. |
#3
| |||
| |||
|
|
This is really stumping me. I don't know how many time's I've done this, but on this one particular case it is not working. My CSS says this: #footer{ color:#888; font-size:20px; } h3{ font-family: Sylfaen, Georgia, "Times New Roman", Times, serif; font-weight:normal; letter-spacing: -1px; margin:0; } This is the only reference to h3 in my CSS file. It is used here: div id="footer" h3> (c) Copyright 2006</h3 /div |
|
Unlike all other instances of using px for font-size units, in this one case only, the resulting <h3> is of significantly different size when viewed in Firefox vs. IE. |
|
I cannot for the life of me figure out why this must be. I have plenty of other CSS styles linked that do this exact sort of thing, using px units, and they behave identically between the two browsers, because afterall pixels are pixels, no matter what software you are using. But this one doesn't! Any ideas? I've studied these little snippets of code for hours and can't understand. |
#4
| |||
| |||
|
|
body { font-size: 1em; } Then adjust all other sizes relative to that: h1 { font-size: 2em; } h2 { font-size: 1.75em; } h3 { font-size: 1.5em; } |
#5
| |||
| |||
|
|
It is my understanding that at some point in the chain, you must have a parent that defines the fixed font size, so everything that uses "em" can be adjusted to that. In your example, there are no fixed font sizes on up the chain, so the em has no original point of reference. This can cause sites to look very different on different browsers, whereas using "px" or a sensible combination of "px" and "em" will make it look identical on all browsers. I guess there are different schools of thought on this, but leaving everything to an "em" is too unpredicatable. See this page: http://www.bigbaer.com/css_tutorials/css_font_size.htm |
#6
| |||
| |||
|
|
body { font-size: 1em; } Then adjust all other sizes relative to that: h1 { font-size: 2em; } h2 { font-size: 1.75em; } h3 { font-size: 1.5em; } Oh wow, I've been warned against this approach big time from all the CSS reading I've been doing. It is my understanding that at some point in the chain, you must have a parent that defines the fixed font size, so everything that uses "em" can be adjusted to that. In your example, there are no fixed font sizes on up the chain, so the em has no original point of reference. This can cause sites to look very different on different browsers, whereas using "px" or a sensible combination of "px" and "em" will make it look identical on all browsers. I guess there are different schools of thought on this, but leaving everything to an "em" is too unpredicatable. See this page: http://www.bigbaer.com/css_tutorials/css_font_size.htm |
#7
| |||
| |||
|
|
div id="footer" h3> (c) Copyright 2006</h3 /div It seems a little perverse to use a header in a footer! |
|
h1 { font-size: 2em; } h2 { font-size: 1.75em; } h3 { font-size: 1.5em; } |
#8
| |||||
| |||||
|
|
body { font-size: 1em; } Then adjust all other sizes relative to that: h1 { font-size: 2em; } h2 { font-size: 1.75em; } h3 { font-size: 1.5em; } Oh wow, I've been warned against this approach big time from all the CSS reading I've been doing. |
|
It is my understanding that at some point in the chain, you must have a parent that defines the fixed font size, so everything that uses "em" can be adjusted to that. |
|
In your example, there are no fixed font sizes on up the chain, |
|
so the em has no original point of reference. This can cause sites to look very different on different browsers, whereas using "px" or a sensible combination of "px" and "em" will make it look identical on all browsers. |
|
I guess there are different schools of thought on this, but leaving everything to an "em" is too unpredicatable. |
![]() |
| Thread Tools | |
| Display Modes | |
| |