In the layout, there is a strip (blue on top) that climbs over the edge of the grid (container). If it would be on both sides, then there are no problems - I make it outside the container, and the content in the container (as other blocks are made), but the question is that the strip crawls out of the net on one side only and nothing comes to mind how to implement it.
2 answers
Background looks out from under the container on one side only.
The gradient allows you to set a background with a blue bar running from the middle to the right edge of the screen:
background: linear-gradient(to right, transparent 50%, darkblue 50%); background-size: 100% 30px; background-repeat: no-repeat; To make this background under the main container, you can make a matryoshka:
.container-fluid>.rowwith gradient>.container>.rowwith site.row
Or:
<header>with gradient>.container>.rowwith site<header>
For clarity, tint areas with the logo and menu in different shades of blue.

1. .container-fluid
In the bootstrap two container options : container-fluid always occupies the entire width of the screen, but simply container sets the column to a fixed width.
https://jsfiddle.net/glebkema/ohLhdwqw
.header { color: darkblue; font-weight: bold; } @media (min-width: 768px) { .header { background: linear-gradient(to right, transparent 50%, darkblue 50%); background-size: 100% 30px; background-repeat: no-repeat; } } .contacts { background: darkblue; color: white; height: 30px; line-height: 30px; } .logo { background: #ccf; height: 100px; line-height: 100px; } .menu { background: #99f; height: 70px; line-height: 70px; } <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> <div class="container-fluid"> <div class="row header"> <div class="container"> <div class="row"> <div class="col-sm-3 logo">Logo</div> <div class="col-sm-9 contacts">Contacts</div> <div class="col-sm-9 menu">Menu</div> </div> </div> </div> </div> 2. <header>
In HTML5, the <header> element specifies the <header> a site or section .
https://jsfiddle.net/glebkema/g54am6u4
header { color: darkblue; font-weight: bold; } @media (min-width: 768px) { header { background: linear-gradient(to right, transparent 50%, darkblue 50%); background-size: 100% 30px; background-repeat: no-repeat; } } .contacts { background: darkblue; color: white; height: 30px; line-height: 30px; } .logo { background: #ccf; height: 100px; line-height: 100px; } .menu { background: #99f; height: 70px; line-height: 70px; } <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> <header> <div class="container"> <div class="row"> <div class="col-sm-3 logo">Logo</div> <div class="col-sm-9 contacts">Contacts</div> <div class="col-sm-9 menu">Menu</div> </div> </div> </header> - Thanks, that is necessary! With .container-fluid did not understand yet, therefore I do not really understand how to use it. - VeroLom pm
- @VeroLom The bootstrap has two container options .
container-fluidalways occupies the entire width of the screen, and justcontainersets the page material to a fixed-width column. If you need a neat column for menus, text and photos. then takecontainer. If you need to take the entire width of the screen -container-fluid. - Gleb Kemarsky - As I understand it, if a part of the page (block) has a background that is different from the other blocks, then you must first register
.container-fluid, in it is an element with a background, and in it is already a regular.containerwith content? Bootstrap only recently began to learn, I do not know everything and comprehended. - VeroLom - @VeroLom
.containerdefines a common column for the material, and.container-fluidhelps add a block that extends beyond this column. For example, a photo, slideshow or video. By the way, to set the background to the full width of the screen, you can use not only.container-fluid, but also<header>. Added this option to your answer. - Gleb Kemarsky
If in the container the blue blue band takes up more than half, then you can do this:
http://www.bootply.com/bdhIp9EVor
<style> #header:after { content: "fill"; width: 50%; background: lightblue; position: absolute; right: 0; top: 0; z-index:-999; } #menu { background: lightblue; } </style> <div class="container-fluid"> <div class="container" id="header"> <div class="row"> <div class="col-md-2">LOGO</div> <div class="col-md-8" id="menu">NAV</div> </div> </div> </div> 
container-fluidfor the background, which should be the full width - lexxlposition: absolutefor this "blue line" (or variations with a pseudo-element for it, etc.) and stretch it to the right to the desired size - lexxl