|
-
Feb 23rd, 2007, 04:30 PM
#4
Re: CSS Behavior between FF2/Safari1.2 and IE7/Opera9
I won't have information about the element's ID during the page's render; for unrelated reasons
Let me guess, it's .Net auto-generated.
Anyway, the answer is no. Unfortunately, both behaviours are perfectly within the specification: all browser override the font size of the h1 with the value from the HTML default style sheet. However, Safari and Firefox follow the (purely informative; it is not a violation of the spec not to do so) recommendation of the CSS specification and make the text size of h1 "2em", meaning twice the size of the parent element, whereas Opera and IE give it an absolute size.
So you either have to explicitly specify the font size or remove the specification on the div.
Which leads you to another problem: there is no way to specify the "browser default value" for the font size. Replace it once, and you have to replace it everywhere, or risk inconsistencies.
Which makes the best solution to not specify the size on the div.
Alternatively, you can force IE and Opera into the "more compliant" (i.e. following the recommendation of the spec) behaviour by explicitly forcing h1's font size to be 2em:
Code:
h1 { font-size: 2em; }
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|