Jesse Luke Orange
Jesse Luke Orange

Reputation: 1999

Bootstrap row padding

Using Bootstrap 3 I'm aware that if a row does not sit inside its container you get extra space due to the -15px of margin either side, compensating for the container, which has a gutter.

I thought this could solve the problem:

.row{
    margin-left: 0px;
    margin-right:0px;
}

.container .row{
    margin-left:-15px;
    margin-right:-15px;
}

But for some reason the margin persists so you get a slight horizontal scroll on mobile devices, which ruins the overall appeal.

(If it helps I could give the address of the site I'm working on?)

Upvotes: 0

Views: 1150

Answers (1)

davidvegacl
davidvegacl

Reputation: 151

You can use .container-fluid

<div class="container-fluid">
  <div class="row">
    <div class="col-XX-XX"></div>
  </div>
</div>

I think that you're using .row without any .col-XX-XX inside. That may cause the problem.

Upvotes: 1

Related Questions