Re: Clarification needed for inline boxes containing block boxes

Boris Zbarsky wrote:
> Giovanni Campagna wrote:
>> Can my text be the solution?
>>
>>> The resulting inline boxes should look exactly as they were contiguous
>>> in DOM, but owned by different line boxes (ie with a line break 
>>> inside the inline box)
> 
> I think so, yes.

Could you explain then why these two spans should look
so "dramatically" different?:

<!DOCTYPE html>
<html>
   <head>
     <style>
       span div { border:1px solid; }
       span { padding: 0 20px; background: green; border: 2px solid red }
     </style>
   </head>
<body>
   <span>aaa<div>bbb</div></span><br/>
   <span>aaa<div style="display:inline-block;
               width:100%;">bbb</div></span>
</body>
</html>


> 
>> Yeah, of course block-in-inline. Well, they wrote invalid HTML, so
>> they should have expected non consistent rendering.
>> In addition, rendering is not consistent even now, so I don't think
>> there are sites like that, as long as they test in IE6/7 and FF2/3
>> (the most used browsers)
> 
> Rendering is only inconsistent if you set borders or padding on the 
> inline.  Rendering without that is pretty consistent....
> 
> -Boris
> 
> 
> 

-- 
Andrew Fedoniouk.

http://terrainformatica.com

Received on Friday, 27 February 2009 05:44:48 UTC