Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Understanding CSS inheritance
Message
De
24/12/2014 02:55:41
 
 
Information générale
Forum:
CSS
Catégorie:
Autre
Divers
Thread ID:
01612514
Message ID:
01612693
Vues:
39
Selector priority / specificity is the key

http://www.w3.org/TR/CSS2/cascade.html#specificity
http://www.w3.org/wiki/CSS/Training/Priority_level_of_selector
http://stackoverflow.com/questions/4072365/css-understanding-the-selectors-priority-specificity


>I am sure that again I am hitting the lack of some basic understanding of CSS. So please help me understand.
>
>I want to include Bootstrap.css in one of the pages but BEFORE my own .CSS. So that my .CSS would take precedence.
>
>For example, in MY.CSS I have a class .FieldWR that set the size of the font of asp:textbox to .75em. And it works when I don't include Bootstrap.css at all. When I add the Boostrap styles in the .ASPX file, before MY.CSS the font size of the text boxes is smaller than what I want. When I look in the Chrome Developer Tools I see the following:
>
>
>
>.FieldWR { My.css: ###
>   font-size: 0.75em;
>   font-weight: normal:
>}
>
>html {    bootstrap.min.css: ###
>   font-size: 62.5%
>   -webkit-tap-hightlight-color: rgba(0,0,0,0);
>}
>
>
>
>So it looks from the above the bootstrap HTML overrides my class. Why?
Thierry Nivelet
FoxinCloud
Give your VFP application a second life, web-based, in YOUR cloud
http://foxincloud.com/
Never explain, never complain (Queen Elizabeth II)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform