Makzan / I share what I learnt

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:


Published on October 10, 2014. More articles like this: CSS, Web Technologies.

Sign up for weekly dispatch each week.

Want productive tips and web technologies links like this in your inbox each week? No spam ever. Just useful content:

Read previous weekly dispatch newsletters.