I don't understand even if I have studied the specificity why my CSS rule below is not applied.
CSS
body {
font-family: 'BNPSans', Arial, Helvetica, sans-serif;
font-size: 12px;
color: black; }
/**
Navbars
*/
.navbar#brandbar {
min-height: 38px; }
.navbar#brandbar .navbar-toggle {
margin-top: 2px;
margin-bottom: 2px; }
.navbar#brandbar .navbar-toggle .icon-bar {
background-color: white; }
.navbar#brandbar .navbar-nav li a {
font-family: 'BNPRounded', Arial, Helvetica, sans-serif;
opacity: 1;
text-transform: uppercase;
text-decoration: none;
font-size: 11px;
font-weight: 700;
line-height: 27px;
text-decoration: none; }
.navbar#brandbar .brand-menus {
margin-right: 50px; }
.navbar#brandbar .brand-textsize {
border-left: 1px solid #008754; }
.navbar#brandbar .brand-textsize li {
border-right: 1px solid #008754; }
.navbar#brandbar .navbar-header a.navbar-brand {
text-transform: uppercase;
margin: 0 0 0 50px;
color: #000 !important;
font-size: 11px;
font-weight: 700;
line-height: 27px; }
.navbar#brandbar .navbar-header a.navbar-brand strong {
color: #bfe5d7;
margin: 0 0 0 5px; }
.topbar p {
fonts-font-family: 'BNPPSans', Arial, Helvetica, sans-serif;
fonts-opacity: 1;
fonts-font-size: 52px;
fonts-color: #7c7c7c; }
And here my HTML:
<div class="row topbar">
<div class="col-md-10 col-md-offset-1">
<div class="row">
<!-- logo and text -->
<div class="col-md-4">
<img class="img-responsive" src="assets/img/bnpp-logo.png"></img> <p>PROVA</p>
</div>
<div class="col-md-4">
</div>
<div class="col-md-4">
</div>
</div>
</div>
</div>
In this case we have two rules that can affect it: .body, .topbar p
The first one has specificity 0001 and the second one 0011 ... Why is the body rule applied ?
element nested....
– Silvio S. Sep 18 '15 at 09:37