0
How can I override bootstrap custom styles
That's how do I make changes on the custom state in other to create my own style please reply fast if you know please.
6 Réponses
+ 2
well I must confess I'm hearing about the so called !important in html for the first time.
your explanation is vague @visph@ illuminate better
+ 4
The '!important" special keyword is used to bypass all priorities of css rules, and get the higher one ( between each important marked rules, the common priority rules continue to be applied ^^ ). You must use it with parsimony, as it breaks the cascading concept, and so introduce hardness for maintening the code :P
Consequently, as inlined css rules ( in 'style' attribute of a html tag ) get by default the most highest priority, if you need to add '!important' to your inlined rule, it's signify that there's some '!important' already set to non-inlined style.
Anyway, you must prefer use inlined style to make some test, and then migrate the rules into non-inlined one: you have to place them after your framework/template style, so change will override previous set, since the selector used for define the rule has an equal or greater priotity... That's can be trivial, and require to good study the declaration of the rules you are using in the template/framework to properly override them ( sometimes, mostly often, it's quite simple and enough to just keep the same selector and define a new propery/value pair ). And so, better to use '!importat' keyword only if really unavoidable ^^
+ 1
If you need to use !important too much... is that it might you don't know how CSS works:
- prevalence of selectors to form a rule
- order of rules (Cascading). The most specific at bottom position is which is applied
0
something like this, {font-size : 100% !important; } add !important to your css code like that.... hope I'm making sense?