PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.info.authoring.CSS > Inline box model question
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Inline box model question

Réponse
 
LinkBack Outils de la discussion
Vieux 02/03/2008, 03h09   #1
GTalbot
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Inline box model question

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/
  Réponse avec citation
Vieux 02/03/2008, 09h09   #2
Ben C
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Inline box model question

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.
  Réponse avec citation
Vieux 03/03/2008, 02h14   #3
GTalbot
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Inline box model question

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
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h59.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10191 seconds with 11 queries