|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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/ |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On 2008-03-02, GTalbot <newsgroup@gtalbot.org> wrote:
> 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. > 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. > 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. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On 2 mar, 04:09, Ben C <spams...@spam.eggs> wrote:
[snipped] > 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). > 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 |
|
![]() |
| Outils de la discussion | |
|
|