Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Foundation 5 grid row nesting negative margin

I've got this weird problem in Zurb Foundation 5. Whenever i nest row inside rows, it produces negative margin, throwing it out of a grid. Here's example markup of my code:

<div class="row main-content">
    <div class="row">
        <div class="breadcrumbs columns small-12">My account / Companies list /</div>
        <div class="columns small-6 heading-container">
            <h1>Create new company</h1>
        </div>
    </div>
</div>

And this is the code, that foundation produces:

.row .row {
    width: auto;
    margin-left: -0.9375rem;
    margin-right: -0.9375rem;
    margin-top: 0;
    margin-bottom: 0;
    max-width: none;
}

How do i prevent this behaviour? Is there something wrong with my markup, or should i override the foundation scss (but i don't want to override default styles).

like image 684
Malyo Avatar asked Nov 25 '25 13:11

Malyo


1 Answers

You need to nest inside a row i.e.

<div class="row">
  <div class="breadcrumbs small-12 columns">
     My account / Companies list /
    <div class="row">
    <div class="Heading-container small-6 columns">
      <h1>Create new company</h1>
    </div>
   </div> <!--/nested row-->
 </div>
</div><!--/row-->
like image 182
Intellidroid Avatar answered Nov 28 '25 03:11

Intellidroid



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!