0

Basically I have two columns inside a container and I'm trying to add a background colour to a column that extends full width outside the container. Here's the mock up.

enter image description here

As you can see, the content inside the yellow background sits inside a column that is inside a column. How do I set the background colour so that it goes full width to left and works for all screens?

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<section>
   <div class="container">
      <div class="row">
         <div class="col-xs-12">
            <h2>
               Project Name
            </h2>
         </div>
      </div>
   </div>
</section>
<section class="spage-intro">
   <div class="container">
      <div class="row">
         <div class="col-sm-4">
            <h3 class="intro-excerpt">
               Vestibulum eu metus at tortor molestie dapibus. Nullam viverra est id metus facilisis, id finibus dolor finibus. Aenean id mi eu risus condimentum ullamcorper.
            </h3>
         </div>
         <div class="col-sm-8">
            <div class="the-content-wrapper">
               Vestibulum eu metus at tortor molestie dapibus. Nullam viverra est id metus facilisis, id finibus dolor finibus. Aenean id mi eu risus condimentum ullamcorper.Vestibulum eu metus at tortor molestie dapibus. Nullam viverra est id metus facilisis, id finibus dolor finibus. Aenean id mi eu risus condimentum ullamcorper.
            </div>
         </div>
      </div>
   </div>
</section>
shutupchigo
  • 703
  • 1
  • 7
  • 19

2 Answers2

0

Add css:

.intro-excerpt{
    background-color: #f6cc08;
}
Mickaël Leger
  • 3,426
  • 2
  • 17
  • 36
Pushprajsinh Chudasama
  • 7,772
  • 4
  • 20
  • 43
0

Plz follow the below steps.. If anything not clear plz ask..

HTML

<div class="col-sm-4 with-bg"></div> 

css

.with-bg {
    position: static;
}
.with-bg::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 35.33%;
    background-color: #f6cc08;
    z-index: -1;
}
Manikandan2811
  • 831
  • 4
  • 9