html - CSS class specificity -


using bootstrap 3 i'm trying override carousel control's css particular carousel out affecting carousels have markup this.

<span class="glyphicon glyphicon-chevron-left chart-previous"></span> 

so i've created css rule selector:

.carousel-control .glyphicon-chevron-left .chart-previous 

to override bootstrap's selector:

.carousel-control .glyphicon-chevron-left 

bootstrap's selector gives me specificity of 0,0,2,0 custom css rule gives specificity of 0,0,3,0, @ least according site http://specificity.keegan.st/. given why bootstrap css rule still override custom rule?

the space in selector descendant combinator.

your span member of both glyphicon-chevron-left , chart-previous.

since isn't descendant of element member of glyphicon-chevron-left, selector doesn't match doesn't matter how specific is.

remove space.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -