Julián Landerreche wrote:
Hi all,

Suppose:

<div>
    <p>I deserve to be a block</p>
    <a>I don't deserve to be a block</a>
</div>

The "a" element has a block parent ("div") as element.
But it also has a sibling element ("p"), which is a block element.

*Would you say it's valid?*

I've been searching (not too much) but haven't find too much about this.
In this article [1], the author talks about *anonymous block boxes*:

"For elements containing a mix of block-level
elements and inline-level elements (or plain text), so-called
anonymous block boxes are generated so that the principal block box
then contains nothing but block boxes." [1]

An his  example is:

<div>
    A line of plain text.
    <p>A paragraph.</p>
    Another line of text.
</div>

which is slightly different to the one I posted.

So, is it valid to mix inline and block elements (as siblings) as long as the inline elements are children of a block element?

Thanks in advance and excuse my english.
Julián Landerreche

[1]: http://www.autisticcuckoo.net/archive.php?id=2005/01/12/block-vs-inline-2



*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************
why not just wrap the paragraph around the link as well? Though I think it should be perfectly valid to have both inline elements and block elements as children of a div. For example, what if I have an entire column of a page wrapped in a div, which is common practice. Why would every child of that div have to be another block element?

*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to