Krab Krab - 3 months ago 21
CSS Question

Twitter Bootstrap - why row class has margin-left: -20px?

I don't understand why row class has

margin-left: -20px
(so it grows after parents border like on the image). I think nobody needs this behavior. Or am I doing something wrong?

<div class="container">
<div id="top-container" class="row">
<div class="span8">
<h1>App</h1>
</div>
<div class="span4">

</div>
</div>
</div>


example

Answer

You can use row-fluid instead of row, then your span4 and span8 won't have margin-left.

<div class="container">
    <div id="top-container" class="row-fluid">
        <div class="span8">
            <h1>App</h1>
        </div>
        <div class="span4">

        </div>
    </div>
</div>