Why is the following code world blue and not red?
Specificity .my_classis equal 0,0,1,0, but inherits a color #my_idwhose value is higher ( 0,1,0,0).
HTML:
<p id='my_id'>
Hello
<span class='my_class'>
world
</span>
</p>
CSS
#my_id {
color: red;
}
.my_class {
color: blue;
}
source
share