HTML & CSS · Middle · Question 2 of 75

How do you override a third-party library's !important rule without touching its code?

Explanation

A normal rule never beats !important, however specific it is. Among several !important declarations, specificity and order apply again. Other options: an inline style with !important, or cascade layers - for !important the layer order is reversed. The best path is avoiding !important in your own code.

Further reading

Problem with a question

HTML & CSS · Middle · question 2

Test yourself

Take the HTML & CSS · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz