How to make CSS file more important than another CSS file?

css, html

Solution

There is no such magic. CSS has its own principles, such as the cascade, and you cannot switch them off.

You can place the reference to `css.css` after the reference to `bootstrap.min.css`, but this is just one factor in the process of resolving how CSS rules will be applied. Adding `!important`, which is generally a symptom of wrong design, is just yet another factor: an `!important` rule in an earlier file may override your `!important` rule, if its selector has higher specificity.

To override CSS rules, you need to analyze the rule you wish to override and set up a rule that “wins”, by the cascade principles.

Problem

I want all the Classes,Tags and Ids within `css.css` overwritten over `bootstrap.min.css` without repeating the Classes,tags and Ids of `bootstrap.min.css`. ``` <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/css.css" rel="stylesheet"> ```

Original source