Jumbotron padding of Bootstrap overriding my CSS -
the image in jumbotron has spaces around. when reduce padding in css, being overridden bootstrap css. !important not working. css file after bootstrap css. trying out lot on this! please help!
thanks in advance
html part:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mtjoasx8j1au+a5wdvnpi2lkffwweaa8hdddjzlplegxhjvme1fgjwpgmkzs7" crossorigin="anonymous"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> <link rel="stylesheet" href="css/styles.css"> <link href='https://fonts.googleapis.com/css?family=lora' rel='stylesheet' type='text/css'> <body> <header> --- navbar part </header> <div id="main-content" class="container"> <div class="jumbotron"> <img src="images/jumb1.jpg" alt="pic1" class="img-responsive center-block"> </div> </div>
css:
.jumbotron { padding-right: 10px; padding-left: 10px; }
if open browser's element inspector, can see overrides css rules , how avoid it. so, if see being written in bootstrap.css:
@media screen , (min-width: 768px) { .jumbotron { padding: 48px 0; }
in order overwrite it, should use media query well. example:
@media screen , (min-width: 768px) { .jumbotron { padding: 20px 10px; }
Comments
Post a Comment