I
I
Ilya2016-01-18 14:42:56
css
Ilya, 2016-01-18 14:42:56

How to make a black background full screen width behind a container in Bootstrap 3.2?

There is a container with a nested row and division into columns.
I set the color of the container to black. Only the grid turns black, but I wanted the container to have a black background for the entire width of the screen. And it's not a nav panel or a footer. The strip in the middle of the screen should be.
How?

<div class="container" style="background-color: black">
            <div class="row">
                <div class="col-md-6">
                    Какой-то текст
                </div>
                <div class="col-md-6">
                    Какая-то картинка
                </div>
            </div>
        </div>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
gassmonkey, 2016-01-18
@hrhr99

Obviously, wrap the container in another block, and give it a background color.

<div class="wrap">
      <div class="container"></div>
</div>

.wrap{
  background: black;
}

codepen.io/anon/pen/xZPwKz

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question