Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- CSS Crib Sheet, cheatsheets, shortcut lists, syntax lists, & others


createErrorMsg - 12:20 pm on Sep 21, 2004 (gmt 0)


Suzy, I figured I was just misunderstanding the format of the W3 data. Thanks for clarifying. Your explanation makes sense.

Generally, inline elements may contain only data and other inline elements

The validator throws up errors if you nest block elements inside of inline elements, but does it actually break the layout? Here's a quote about inline and block boxes from the W3 CSS2.1 specs...

When an inline box contains a block box, the inline box (and its inline ancestors within the same line box) are broken around the block. The line boxes before the break and after the break are enclosed in anonymous boxes, and the block box becomes a sibling of those anonymous boxes.

It's all clear now! ;)

Although I'm still trying to parse out the full meaning of these two sentences, at the very least it pretty clearly states that CSS allows block boxes inside of inline boxes.

This is a tad confusing, since in order to do so with CSS would require nesting in the html, which would throw up a validation error!

Unless it's meant only for boxes defined as block and inline using the display property? Like nesting a block level div in a div styled as inline?


Thread source:: http://www.webmasterworld.com/css/4514.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com