+ 1
Is it possible to costumize the color of navbar in bootstrap 4 using your own css?
Navbar bootstrap 4 color
5 Antworten
+ 2
EmmanueLZ.
Not exactly: for css, the order of linked file do not really matter... only in case of equal precedance rules, the later will override the sooner (so if you target to customize the framework, it's better practice to load the framework before your customized css, and obviously that's more logical and understandable for a code reader -- and wriiter necessarly)
+ 2
If you define a new color with a selector having more precedance than the color defined by the framework, it will override the value even if it's declared/loaded sooner:
.yel { color:yellow; }
div { color:cyan; }
<div class='yel'></div>
will have a yellow color applied, because class have more precedance than element (that's a basic example, often the selectors are more complex, impliying difficulty to see wich has precedance or how get more precedance than another rule -- and could leave some unexpected rules not applied even if after those we thinking ovveride)
+ 1
Sure: you could customize anything you can customize with only css by using any css framework... you just have to put css rules wich have more precedance than potentially already defined (customized) rules by the framework ^^
+ 1
visph , ok thanks,
I thought it was his case as he wanted to customize the navbar color provided by bootstrap.