On Aug 21, 2006, at 10:16 PM, ray wrote:

> <html>
>   <head>
>     <meta http-equiv="Content-Type" content="text/html;  
> charset=iso-8859-1"
> />
>     <title>Untitled Document</title>
>   </head>
>   <body>
>     <p>abc</p>
>     <label>label1</label>
>     <label>label2</label>
>   </body>
> </html>
> I think this html will result in 3 lines, one for abc, one for  
> label1 and
> one for label3. The block box generated for body element contains  
> three
> boxes, one block box for p, the other two inline boxes for labels,   
> because
> CSS 2.1 specification says: Block-level elements (except for  
> display 'table'
> elements, which are described in a later chapter) generate a  
> principal block
> box that contains either only block boxes or only
> <file:///home/ray/.mozilla/firefox/rbp1q15z.default/ScrapBook/data/ 
> 20060819165938/index.html#inline-box>inlines
> boxes, so I think each inline box should be wrapped in an anonymous
> block box and participates in a block formatting context,  laid out
> vertically, one after another. But the result is not what I  
> expected: the
> label boxes lay out on a single line. Why? Thanks.

<label> is an inline element, unless you modify its display value  
through a stylesheet. You show no signs of doing that.
<http://www.w3.org/TR/html401/interact/forms.html#edef-LABEL>
Hence a UA will generate - at best -  only one anonymous block box  
wrapping around your two labels. But that is an OT discussion for  
this list.

Note also that your code is invalid for html strict.

Philippe
---
Philippe Wittenbergh
<http://emps.l-c-n.com>




______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to