After adding the class "row" objects fall into the row I need, but they acquire a property that I don’t need. Indents themselves

  • Explain in more detail what the объекты попадают в нужную мне строку mean объекты попадают в нужную мне строку . I want to understand why the tag <header> needed the class .row . What result is needed? - Gleb Kemarsky

2 answers 2

  1. Bootstrap assumes that a block with a class .row is inside a block with a class .container or .container-fluid :

    Rows must be placed (a fixed-width) or .container-fluid (full-width) for proper alignment and padding.

    Since you are using Bootstrap, it is better not to overlap the .row properties, but to wrap the code in the missing container.

  2. Do not assign the .row tag to the <header> .row . They are from different operas. <header> about the markup structure, and .row - about the string in the Bootstrap grid.

  • It won't save margins and paddings from the bootstrap, sometimes they really get in the way. - Ep1demic
  • @ Ep1demic In Boostrap, padding containers and row margins compensate each other. - Gleb Kemarsky

What's the problem? In CSS

 .row{margin:0;padding:0;} 

Or wrap the desired row in a block and ...:

 .wrap .row{margin:0;padding:0;} 

If it doesn’t work (bootstrap connects below your CSS (according to a cascading table), set margin to force , for example:

 .row{margin:0 !important; padding:0 !important;}