Philippe Wittenbergh wrote:

On Feb 8, 2011, at 5:09 AM, Jukka K. Korpela wrote:

It seems that even browsers that natively support the HTML5 proposed
element <header> fail to do that properly - assuming that proper
support includes treating it as a block level element by default.
You can see this easily if you use <header> with some border setting
and test it on Firefox.

Which version of Firefox are you testing ?

3.6.13.

Gecko 1.9.2.x and older
(Fx 3.6) 'understand' the <header> element - that is, it sorta exist
in the dom and can be used for styling purposes - but that is about
it.

Yes, my wording "natively support" was bad. I meant browsers that recognize <header> markup and parse the element into the DOM, as opposite to IE that needs help even with that.

It basically remains an unknown element, and as such treated as
inline. Other older browsers do the same (e.g. Safari 4, IE < 9,...)
Gecko 2.0, with its html5 parser, treats the element as 'block' by
default.

I still haven't found a statement in HTML5 drafts saying that <header> must, or even should, be treated as having display: block by default, even though I intuitively expect it to be treated that way. But this is just yet another reason for explicitly setting its display property:

Apparently this can be cured by using
header { display: block; }

Not 'apparently' but 'surely' :-), as its default display value is
inline.

The same seems to apply to the other new block-like elements in HTML5: article, aside, footer, hgroup, nav, section should all have display: block in an author's style sheet if he uses them (unless, of course, he has a special reason to have them rendered otherwise).

--
Yucca, http://www.cs.tut.fi/~jkorpela/
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to