W3C home > Mailing lists > Public > www-style@w3.org > August 2005

Re: CSS 2.1 Block inside inline behaviour

From: David Woolley <david@djwhome.demon.co.uk>
Date: Fri, 26 Aug 2005 07:06:28 +0100 (BST)
Message-Id: <200508260606.j7Q66Sl07626@djwhome.demon.co.uk>
To: www-style@w3.org

>       <span style="background-color: yellow; color: red">
>             Inline text
>             <div>Block level element</div>

This is invalid code, so what you are probaby seeing is differences in
error recovery.  In particular, what you are probably seeing, in one
case, is the parser fixing the code by inserting </span> when it finds
the element that is incompatible with its content model, and in the
other case, the parse ignoring the content model.

If you want to test the CSS aspects of this, you need to override the
display property of an inline element to be block, not illegally nest
a block element in an inline element.
Received on Friday, 26 August 2005 06:21:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:40 GMT