nadya nadya - 4 months ago 20
CSS Question

Color white and black, black should be at first

.color {color:#000; background-color:#fff; color:#fff}

<p class="color">some text</p>


The result as below:(nothing) My question here why should color in
#000
ignored?!!!!

Answer

In CSS, compiler overrides any rules found last with all the previous ones, unless you add !important in your styles.

Comments