N
N
Nikita Melikhov2018-08-13 13:35:45
css
Nikita Melikhov, 2018-08-13 13:35:45

How to make a part background to the edge of the window on only one side in the Bootstrap 4 grid?

There is a layout:
5b715e109dfea731158713.png
Extreme vertical guides - the width of the container block .
On the left is the part with a green background, but you need to color not only the column itself in the container, but also the part up to the edge of the window. This is where I got stuck :(
When I need a background that is colored entirely - I put everything in container-fluid , to which I assign the background, it's easy.
There was a layout when exactly half should be painted over - I made a wide horizontal strip 1px high, where one half is painted in maybe a crutch, but rather harmless :)
There are no ideas at all how to do this so that it is not a wild and crooked crutch.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hellcaster, 2018-08-13
@VeroLom

body {
 background-image: linear-gradient(to right, green 0%, green 50%, white 50%, white 100%);
} /*а дальше самим блокам задаем background*/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question