Hello. Help me please. I want to have two more blocks, but on the right side. Where I marked the black line. To be divided on the right in the same way as on the left. I prescribed properties for the right side, but for some reason it was not divided. I can not understand. I want a row to have a col-md 3 block; col-md-6, col-md-3. Left, middle, right. And there are at least two rows. But it does not work. Tell me please. enter image description here

/*笑袙袝孝 袠 袨孝小孝校袩 小袧袠袟校 袛袥携 袘袥袨袣袨袙*/ * { margin: 0; padding: 0; } .head-block, .top-menu, .top-material, .left-sidebar, .right-sidebar, .content { background: #ccc; margin-bottom: 1px; } /*袙蝎小袨孝袗 楔袗袩袣袠*/ .head-block { height: 150px; } /*袙蝎小袨孝袗 袦袝袧挟*/ .top-menu { height: 30px; } /*袙蝎小袨孝袗 袘袥袨袣袗 袙袗袞袧蝎袝 袦袗孝袝袪袠袗袥蝎*/ .top-material { height: 200px; } /*袙蝎小袨孝袗 小袗袡袛袘袗袪袗 袠 袘袥袨袣袗 袣袨袧孝袝袧孝*/ .left-sidebar, .content { height: 300px; } .right-sidebar, .content { height: 300px; } /*袚袪袗袧袠笑袗 校 袣袨袧孝袝袧孝袗*/ .content { border-left: 1px solid #fff; } .top-menu { background: #daf2fe; } .top-menu ul { padding-left: 0; margin-bottom: 0; } .top-menu li { display: inline-block; margin-left: 10px; padding: 3px 10px; } 
 <!DOCTYPE html> <html> <head> <title>袚谢邪胁薪邪褟</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Bootstrap --> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link href="css/bootstrap.min.css" rel="stylesheet" media="screen"> <link href="css/dopstyle.css" rel="stylesheet" media="screen"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script src="../../assets/js/html5shiv.js"></script> <script src="../../assets/js/respond.min.js"></script> <![endif]--> </head> <body> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <script src="//code.jquery.com/jquery.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="js/bootstrap.min.js"></script> <div class="container-fluid"> <div class="row"> <div class="col-md-12 head-block"></div> <div class="col-md-12 top-menu"> <ul> <li><a href="#">袚谢邪胁薪邪褟</a> </li> <li><a href="#">校褋谢褍谐懈</a> </li> <li><a href="#">袨 薪邪褋</a> </li> <li><a href="#">袣芯薪褌邪泻褌褘</a> </li> </ul> </div> <div class="col-md-12 top-material"></div> <div class="col-md-3 left-sidebar"></div> <div class="col-md-6 content"></div> <div class="col-md-3 right-sidebar"></div> <div class="col-md-3 left-sidebar"></div> <div class="col-md-6 content"></div> <div class="col-md-3 right-sidebar"></div> </div> </div> </body> </html> 

    1 answer 1

    You have blocks on the right, you do not see the separation due to the invisible border. To display the border you need to add border-right: 1px solid #fff; for the .content block in line 43 of the css given by you, i.e .:

     .content { border-left: 1px solid #fff; border-right: 1px solid #fff; } 

    Result:

     /*笑袙袝孝 袠 袨孝小孝校袩 小袧袠袟校 袛袥携 袘袥袨袣袨袙*/ * { margin: 0; padding: 0; } .head-block, .top-menu, .top-material, .left-sidebar, .right-sidebar, .content { background: #ccc; margin-bottom: 1px; } /*袙蝎小袨孝袗 楔袗袩袣袠*/ .head-block { height: 150px; } /*袙蝎小袨孝袗 袦袝袧挟*/ .top-menu { height: 30px; } /*袙蝎小袨孝袗 袘袥袨袣袗 袙袗袞袧蝎袝 袦袗孝袝袪袠袗袥蝎*/ .top-material { height: 200px; } /*袙蝎小袨孝袗 小袗袡袛袘袗袪袗 袠 袘袥袨袣袗 袣袨袧孝袝袧孝*/ .left-sidebar, .content { height: 300px; } .right-sidebar, .content { height: 300px; } /*袚袪袗袧袠笑袗 校 袣袨袧孝袝袧孝袗*/ .content { border-left: 1px solid #fff; border-right: 1px solid #fff; } .top-menu { background: #daf2fe; } .top-menu ul { padding-left: 0; margin-bottom: 0; } .top-menu li { display: inline-block; margin-left: 10px; padding: 3px 10px; } 
     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <div class="container-fluid"> <div class="row"> <div class="col-md-12 head-block"></div> <div class="col-md-12 top-menu"> <ul> <li><a href="#">袚谢邪胁薪邪褟</a> </li> <li><a href="#">校褋谢褍谐懈</a> </li> <li><a href="#">袨 薪邪褋</a> </li> <li><a href="#">袣芯薪褌邪泻褌褘</a> </li> </ul> </div> <div class="col-md-12 top-material"></div> <div class="col-md-3 left-sidebar"></div> <div class="col-md-6 content"></div> <div class="col-md-3 right-sidebar"></div> <div class="col-md-3 left-sidebar"></div> <div class="col-md-6 content"></div> <div class="col-md-3 right-sidebar"></div> </div> </div> 

    taking into account the col-md from 992px to correctly display the result, you need to use the fiddle option to expand the fragment

    • thank you very much! And still such mini-question. Can I combine two content blocks in the middle, into one big block? How can i do this? And can I resize col-md at my discretion? - DaniiL337
    • one
      You can combine, but please explain what you want to get in the end (preferably a screenshot), you can change the sizes of col-md, but you need to do this carefully because by changing them you can break the grid of all elements that use this style. - Alex
    • This is what I want ideally ( radikal.ru/big/p6550760hevqv - DaniiL337
    • one
      @ DaniiL337 please see an example - Alex
    • Thank you very much. All as wanted. - DaniiL337