Bootstrap.minnew.css

Bootstrap.minnew.css
0.0 0

#1

how to override bootstrap css to style sheet css.


#2

Are you asking a question on how to override the styles from bootstrap?

From my understanding, the style sheets are loaded in the order they are assigned to the page. The earliest style sheets are overridden once another style sheet is loaded which contains similarly named styles.


#3

@vpandey,
you can also add !important to any style rules and that will take precedence over other style rules from other style sheets.


#4

Another issue that can arise even if you have your style.css after bootstrap.css, is that the bootstrap styles are more specific.

For example, if bootstrap.css has:

#jumbotron h2 span.coolSpan:hover {
  color: green;
}

And you try to write in style.css:

.coolSpan:hover {
  color: blue;
}

Bootstrap will still override because their style is more specific.


#5

You can use the key word “!important” to overwrite almost any style

Example: if bootstrap sets the background-color property to red in the “danger-bg” class you could do something like

.danger-bg{
background-color: #anycolor !important;
}