2
I’m recently studying Bootstrap and realized that I can, for example, edit the background of a .nav-bar
using the !important
in css.
Is doing it that way wrong? Would I have any consequences on small projects? And large projects? If it is a wrong mode to edit Bootstrap, what would be the recommended mode?
Example:
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">WebSiteName</a>
</div>
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Page 1</a></li>
<li><a href="#">Page 2</a></li>
<li><a href="#">Page 3</a></li>
</ul>
</div>
</nav>
CSS:
.navbar{
background-color: #EEEEEE !important; /*Forçando a mudança de cor de fundo*/
}
Related: What is the purpose of the declaration "!?
– rray