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

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 UTC