W3C home > Mailing lists > Public > www-style@w3.org > January 2003

Re: Block boxes inside inline boxes; Legal or not?

From: Rijk van Geijtenbeek <rijk@iname.com>
Date: Wed, 08 Jan 2003 11:16:27 +0100
To: "www-style.w3.org" <www-style@w3.org>
Message-ID: <oprioetps6ppt21i@smtp.concepts-ict.nl>

On Tue, 07 Jan 2003 23:49:46 -0500, Boris Zbarsky <bzbarsky@MIT.EDU> wrote:

>
>> <SPAN>
>> Some text
>> <P>More text</P>
>> Some more text
>> </SPAN>
>
> http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level the red 
> section starting "This model would apply in the following example if the 
> following rules:" seems to say that this is perfectly valid and even 
> describes the
> rendering.

This is an unclear part of the spec. There are two examples given. The text 
describing what should happen in the second example mentions a DIV that is 
only there in the first example though. The rendering of this example:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Anonymous text interrupted by a block</title>
<style type="text/css">
div { display: inline; background: yellow; border: thin solid red; }
p    { display: block; background: lime; }
</style>
</head>
<body>
<div>This is anonymous text before the P. <p>This is the content of P.</p>
This is anonymous text after the P.</div>
</body>
</html>

... is different in MSIE 6, Opera 6/7 and Mozilla, but none of them render 
a continuous red border around all the content. The text in the spec 
doesn't help me much in deciding what should have happened.

-- 
Rijk van Geijtenbeek
Received on Wednesday, 8 January 2003 05:17:27 GMT

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