Reputation: 2597
Alright, I can't think of a good way to explain this, so here's a graphic which may help.
I have a 3 column grid of inline-block elements that need to have a margin between themselves. There should not, however, be a margin between the 1st/3rd element of each row and the parent container. Is there a slick way to do this, particularly with CSS? I'm open to any technique that will work.
Html is basically this:
<section>
<article class=“box”>
<img class="thumb" src="img/image.jpg">
<p>Name</p>
</article>
<article class=“box”>
<img class="thumb" src="img/image.jpg">
<p>Name</p>
</article>
<article class=“box”>
<img class="thumb" src="img/image.jpg">
<p>Name</p>
</article>
</section>
Upvotes: 0
Views: 300