Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap get priority over my CSS - with correct implementation order

I've linked bootstrap's css file first.
I've linked my css file second.

css implementation order

Why does bootstrap gets priority over my css??
I've played with the file order, there is no "important" setting on the bs rules.
I haven't found any related issue... please help. thanks.

enter image description here

like image 472
Sierion Avatar asked Aug 09 '26 17:08

Sierion


1 Answers

In this situation, bootstrap's code is more specific (has 2 classes, while yours has only one specified).

Take a look at this MDN page for more information

You can override bootstrap by being more specific or using '!important' in your css rule (be aware that usually !important is not to be preferred, higher specificity is more flexible and easy to further override or change)

color: #C77358 !important;

like image 57
Drago96 Avatar answered Aug 11 '26 13:08

Drago96



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!