html - Remove Extra padding from CSS3 multi-column items, how? -
i'm trying create masonry layout using css3 multi-column have problem. last item have padding push bottom element lower tot bottom. want remove bottom padding multi-column element have narrower bottom padding element below it. here's bottom padding want removed.
this image of problem :
here's markup.
<div class="span8" id="content-wrapper"> <div class="content" id="container"> <article class="item"> ... </article> <article class="item"> ... </article> <article class="item"> ... </article> <article class="item"> ... </article> </div> <nav class="pagination loop-pagination"> <a class="prev page-numbers" href="#">previous</a> <a class="page-numbers" href="#">1</a> <span class="page-numbers current">2</span> <a class="page-numbers" href="#">3</a> <span class="page-numbers dots">…</span> <a class="page-numbers" href="#">5</a> <a class="next page-numbers" href="#">next</a> </nav> </div> .content { overflow: hidden; column-count: 2; -webkit-column-count: 2; column-gap: 25px; -webkit-column-gap: 25px; column-fill: auto; -webkit-column-fill: auto; } .item { margin-bottom: 3em; -webkit-column-break-inside: avoid; -moz-column-break-inside: avoid; column-break-inside: avoid; break-inside: avoid; }
and here's jsfiddle. possible that? thanks.
edit:
if possible, want keep column-break-inside: avoid; , content got cut off if column break inside removed.
also depending on content size, bottom padding varied on size. want make behave jquery masonry.
thanks.
try this:
.item { margin-bottom: .90em; -webkit-column-break-inside: avoid; -moz-column-break-inside: avoid; column-break-inside: avoid; break-inside: avoid; }
updated fiddle:
Comments
Post a Comment