Re: Clarification needed for inline boxes containing block boxes

On Thu, Feb 26, 2009 at 1:33 PM, Andrew Fedoniouk
<news@terrainformatica.com> wrote:
> Boris, I see rendering of your first case as in attachment in
> Opera 9.63 (Win).
>
> I am not sure that this is a desirable rendering at all.

I see it differently, like:

[    aaa
bbb
    ]

> And yet. According to current HTML spec:
> http://www.w3.org/TR/html401/sgml/dtd.html#inline
>
> SPAN are not allowed to contain block elements such as
> DIV. In the same way as P's cannot contain DIVs.
>
> So I think that the behavior in this case should be
> consistent with these cases:
>
> <p style="padding: 0 20px; background: green; border: 2px solid
> red">aaa<div>bbb</div></p>
>
> <p style="padding: 0 20px; background: green; border: 2px solid
> red">aaa<div>bbb</div>ccc</p>

that's true that span cannot contain block elements (like div) inside,
but a whole different story.
and changing that span to p goes off in completely different directions.

i slightly modified the testcase (see below). hope that helps.

data:text/html,<!DOCTYPE html><span style="padding: 0 20px;
background: green; border: 2px solid red">aaa<span
style="display:block">bbb</span></span>

-- 
Masataka Yakura
<myakura.web@gmail.com>

Received on Thursday, 26 February 2009 06:17:36 UTC