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 :

this image here

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.

http://imgur.com/rrrst41

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:

http://jsfiddle.net/amitkansal/urztrauk/2/


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -