Dave G. Dave G. - 4 months ago 13
HTML Question

Using CSS with Bootstrap will not work no matter what I try

I am using bootstrap libraries to create my website and I want to use CSS to modify parts of the pare layout like the background color and the color of the jumbotron but nothing will make that work.

How do I apply CSS to work alongside with bootstrap.

.jumbotron
{
background-color:red !important;
}

#body
{
background-color:black;
}





<body>
<div class="body">
<div class="jumbotron">
<div class="container text-center">
<p>"Quote goes here"</p>
<h1>Site name</h1>
<p>Motto and slogan goes here</p>
</div>
</div>
</div>
</body>


Thanks

Answer

have you wrap you css in the style tag?

<style type="text/css">
 .jumbotron 
    {
        background-color:red !important; 
    }

body
    {
        background-color:black;
    }
</style>
<body>
  <div class="body">
    <div class="jumbotron">
      <div class="container text-center">
        <p>"Quote goes here"</p>
        <h1>Site name</h1>
        <p>Motto and slogan goes here</p>
      </div>
    </div>
  </div>
</body>

results

Comments