I want to move the element to the right by a certain number of pixels, the solution in two ways, 1 way to move through the margin-left:

<div> <p style='margin-left: xx px'>some text</p> </div> 

2 way to move this element with a bootstrap net or another

 <div class='row'> <div class='col-md-4'></div> <div class='col-md-8'> <p>some text</p> </div> </div> 

Vospros, what method would you prefer (maybe something else)? Is there any difference with adaptive layout?

    1 answer 1

    If you need to move a few pixels, this is the margin . If you need to offset grid - this is offset :

     <div class='row'> <div class='col-md-8 col-md-offset-4'> <p>some text</p> </div> </div> 

    In this case, col-md-offset-4 will replace the offset column - this is more correct (see CSS Bootstrap 3 reference section : Grid system: Offsetting columns )

    • Thanks for the answer, I would like to learn how to position elements without using a margin, on one grid system, sorry offset is not designed for more accurate shifts, for example col-md-offset-4.05 =) - AlexeyAl
    • one
      You can always split the grid into more columns when setting;) just for the sake of 0.05 columns, it is better to use the margin. - Mik