HighDots Forums  

Inline box model question

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Inline box model question in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
GTalbot
 
Posts: n/a

Default Inline box model question - 03-01-2008 , 09:09 PM






Hello fellow stylesheet colleagues,

I'd like to be sure about my understanding of the inline box model.

Question: In this webpage,
http://www.gtalbot.org/BrowserBugsSe...eElements.html
I submit that inline box height should not grow, should not stretch
vertically to fit nested inline child elements. Am I wrong? I can't
seem to find the exact spot where CSS 2.1 says so.

Same issue, same question with
http://www.gtalbot.org/BrowserBugsSe...I-padding.html
and
http://www.gtalbot.org/BrowserBugsSe...LI-margin.html

I think CSS 2.1, section 10.6.1
applies, in particular
"The vertical padding, border and margin of an inline, non-replaced
box start at the top and bottom of the content area, not the 'line-
height'. But only the 'line-height' is used when calculating the
height of the line box."
http://www.w3.org/TR/CSS21/visudet.h...e-non-replaced

Ref.:
http://www.gtalbot.org/BrowserBugsSe...IE7Bugs/#bug15
http://www.gtalbot.org/BrowserBugsSe...E7Bugs/#bug114
http://www.gtalbot.org/BrowserBugsSe...E7Bugs/#bug115

Regards, Gérard
--
Internet Explorer 7 bugs
http://www.gtalbot.org/BrowserBugsSection/MSIE7Bugs/

Reply With Quote
  #2  
Old   
Ben C
 
Posts: n/a

Default Re: Inline box model question - 03-02-2008 , 03:09 AM






On 2008-03-02, GTalbot <newsgroup (AT) gtalbot (DOT) org> wrote:
Quote:
Hello fellow stylesheet colleagues,

I'd like to be sure about my understanding of the inline box model.

Question: In this webpage,
http://www.gtalbot.org/BrowserBugsSe...eElements.html
I submit that inline box height should not grow, should not stretch
vertically to fit nested inline child elements.
That's correct.

Quote:
Am I wrong? I can't
seem to find the exact spot where CSS 2.1 says so.
I think you have found it-- 10.6.1, right the beginning. The height of
an inline box's content area is based on the font. Nothing is mentioned
about inline descendents. Therefore they are not involved.

You will find a slight anomaly in Firefox with outline on inline boxes--
I suspect it's because because outline is sometimes used to indicate the
focussed element and when there are imgs in links most people prefer
the outline to go around the img not strictly around the <a>'s inline
box.

Quote:
Same issue, same question with
http://www.gtalbot.org/BrowserBugsSe...I-padding.html
and
http://www.gtalbot.org/BrowserBugsSe...LI-margin.html

I think CSS 2.1, section 10.6.1
applies, in particular
"The vertical padding, border and margin of an inline, non-replaced
box start at the top and bottom of the content area, not the 'line-
height'. But only the 'line-height' is used when calculating the
height of the line box."
http://www.w3.org/TR/CSS21/visudet.h...e-non-replaced
Yes, exactly. In the two examples above you haven't set line-height,
but you're demonstrating the same issue that padding on descendent
inlines isn't involved in inline box height calculation.


Reply With Quote
  #3  
Old   
GTalbot
 
Posts: n/a

Default Re: Inline box model question - 03-02-2008 , 08:14 PM



On 2 mar, 04:09, Ben C <spams... (AT) spam (DOT) eggs> wrote:

[snipped]

Quote:
Yes, exactly. In the two examples above you haven't set line-height,
Usually, default font-size in all browsers (IE, Firefox, Safari) is
16px and so the default line-height will be 20px (2px half-leading).

Quote:
but you're demonstrating the same issue that padding on descendent
inlines isn't involved in inline box height calculation.
Thank you again, Ben! I appreciate your insight and comments.

Best regards, Gérard


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.