CSS rules priority

Types of selector has the following priority order.

!important > inline style="" > ID > class > DOM Element

When two selectors are in the same types, the count determines the orders. Demo:

Makzan
I teach web design. I write books on HTML5 games development. I host classes on mobile web and app development. I made animation with Adobe Flash (now Animate).

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.