0

I am trying to override a bootstrap class specifically: .container

I have created a CSS file which I load AFTER Bootstrap.min.css. The class in my css file is:

    .container {
   background-color: #f2f2f2 !important;
   border-left: 1px solid #669933 !important;
   border-right: 1px solid #669933 !important;
}

This does nothing, BUT if I make my CSS file this:

.container {
   background-color: #f2f2f2 !important;
   border-left: 1px solid #669933 !important;
   border-right: 1px solid #669933 !important;
}
.container {
   background-color: #f2f2f2 !important;
   border-left: 1px solid #669933 !important;
   border-right: 1px solid #669933 !important;
}

It then works! The class is identical, but listed twice. Why does this work only when listed twice and what am I doing wrong?

Cadell
  • 1

1 Answers1

0

Css always taking the first class property, so try to load first.