Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Font style in div still affected by previous tag
Message
De
22/01/2016 03:09:42
 
 
À
21/01/2016 22:48:22
Information générale
Forum:
HTML5
Catégorie:
HTML
Divers
Thread ID:
01630054
Message ID:
01630062
Vues:
43
>If I have this style:
>
>
>div.InformationTitle
>{
>   font-size: 16px;
>   color: #000000;
>   font-weight: bold;
>   text-transform: uppercase;
>   font-style: normal;
>}
>
>div.Content
>{
>   font-family: Calibri, Arial, Helvetica, sans-serif;
>   font-size: 14px;
>   font-style: normal;
>   font-weight: normal;
>}
>
>
>And, this code:
>
>
><div class="Content">Articles about something <b>Internet Applications with <i>Visual FoxPro 6.0</div><div class="InformationTitle">Speaking experience</div>
>
>
>...this will having the "Speaking experience" text to be italic.
>
>However, if I insert a space between the two divs:
>
>
><div class="Content">Articles about something <b>Internet Applications with <i>Visual FoxPro 6.0</div> <div class="InformationTitle">Speaking experience</div>
>
>
>...then, the "Speaking experience" text is not italic.
>
>On the second example, the style InformationTitle properly reads its CSS definition. The CSS definition tells that style to have a font-style normal.
>
>Why is this not working on the first example and why the space is a factor?
>
>Basically, as the style includes a font-style normal, I would expect the font-style to always be normal no matter is an italic tag has not been properly closed above.

I'm not seeing that behaviour ("Speaking Experience" is in italic regardless of spacing) - what browser were you using?
But, bottom line, the HTML is not valid and there is no defined behaviour for such a pattern so no 'right or wrong' browser rendering......
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform