A
A
aliasst2018-01-26 20:47:45
css
aliasst, 2018-01-26 20:47:45

How to make the layout in bootstrap 4 fluid to a certain width of the center block?

It is necessary that the central block be rubbery up to a width of 1120px, after further increase in the browser it should be centered in the center... Did I do it right?

<div class="container-fluid">
    <div class="row justify-content-center">
        <div class="col mycol ">
    <div class="row">
                      <div class="col ">Моя колонка 1</div>
          <div class="col ">Моя колонка 2</div>
    </div>
  </div>
   </div>
</div>
  
  <style>
  
  .mycol {background:red; max-width:1120px;}
  
  </style>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
I'm Yoda, 2018-01-26
@aliasst

why not use

<div class="container">
     <div class="row">
          <div class="col">
                    
          </div>
     </div>
</div>

@media (min-width: 1200px)
.container {
    max-width: 1140px;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question