Reputation: 93
I am trying to add Div and Div which comes at bottom has extra margin on 4th span.
4th Span comes at bottom but is not properly aligned. It has more left-padding than above one.
here are my code :-
<div class="row-fluid">
<div class=span12>
<div class=span4>
<div style="background: url(img/background.jpg) center no-repeat">
<h2> </h2>
<h2> </h2>
<h2> </h2>
<h2> </h2>
</div>
</div>
<div class="span4">
<div style="background: url(img/background.jpg) center no-repeat">
<h2> </h2>
<h2> </h2>
<h2> </h2>
<h2> </h2>
</div>
</div>
<div class="span4">
<div style="background: url(img/background.jpg) center no-repeat">
<h2> </h2>
<h2> </h2>
<h2> </h2>
<h2> </h2>
</div>
</div>
<div class="span4">
<div style="background: url(img/background.jpg) center no-repeat">
<h2> </h2>
<h2> </h2>
<h2> </h2>
<h2> </h2>
</div>
</div>
</div>
</div>
Upvotes: 1
Views: 4439
Reputation: 4054
You need another <div class="row"></div
in there, like below:
<div class="row-fluid">
<div class=span12>
<div class="row"> <!-- Additional row HERE -->
<div class=span4>
<div style="background: url(img/background.jpg) center no-repeat">
<h2> </h2>
<h2> </h2>
<h2> </h2>
<h2> </h2>
</div>
</div>
<div class="span4">
<div style="background: url(img/background.jpg) center no-repeat">
<h2> </h2>
<h2> </h2>
<h2> </h2>
<h2> </h2>
</div>
</div>
<div class="span4">
<div style="background: url(img/background.jpg) center no-repeat">
<h2> </h2>
<h2> </h2>
<h2> </h2>
<h2> </h2>
</div>
</div>
</div>
</div>
<div class=span12>
<div class="row"> <!-- Additional row HERE -->
<div class="span4">
<div style="background: url(img/background.jpg) center no-repeat">
<h2> </h2>
<h2> </h2>
<h2> </h2>
<h2> </h2>
</div>
</div>
</div>
</div>
</div>
Upvotes: 1
Reputation: 72
i think the solution is
<div class="row-fluid">
<div class=span12>
<div class=span4>
<div style="background: url(img/background.jpg) center no-repeat">
<h2> </h2>
<h2> </h2>
<h2> </h2>
<h2> </h2>
</div>
</div>
<div class="span4">
<div style="background: url(img/background.jpg) center no-repeat">
<h2> </h2>
<h2> </h2>
<h2> </h2>
<h2> </h2>
</div>
</div>
<div class="span4">
<div style="background: url(img/background.jpg) center no-repeat">
<h2> </h2>
<h2> </h2>
<h2> </h2>
<h2> </h2>
</div>
</div>
</div>
<div class=span12>
<div class="span4">
<div style="background: url(img/background.jpg) center no-repeat">
<h2> </h2>
<h2> </h2>
<h2> </h2>
<h2> </h2>
</div>
</div>
</div>
</div>
this because you complete the grid with 3 span4, in other words, 3*span4 = 12 then, you need create a new div container with span12 and inside of this div you can add new spanN until complete the 12 grid you got it? :)
Upvotes: 0