placing items in straight rows with jQuery plugin

This is A small, lightweight jQuery plugin for placing items in straight rows.
Installation
<script src="path/to/jquery.min.js" > <script src="path/to/jquery.row-grid.min.js" >
HTML:
<div class="container"> <div class="item"> <img src="path/to/image" width="120" height="100" /> </div> <div class="item"> <img src="path/to/image" width="130" height="100" /> </div> ... </div>
CSS:
.container { background: #eee; } /* clearfix */ .container:before, .container:after { content: ""; display: table; } .container:after { clear: both; } .item { float: left; margin-bottom: 10px; } .item img { max-width: 100%; max-height: 100%; vertical-align: bottom; } .first-item { clear: both; } /* remove margin bottom on last row */ .last-row, .last-row ~ .item { margin-bottom: 0; }
Read more:http://brunjo.github.io/rowGrid.js/
You might also like
Tags
accordion accordion menu animation navigation animation navigation menu buttons carousel checkbox inputs css3 css3 menu css3 navigation date picker dialog drag drop drop down menu drop down navigation menu elastic navigation form gallery glide navigation horizontal navigation menu hover effect image gallery image hover image lightbox image scroller image slideshow multi-level navigation menus rating select dependent select list slide image slider menu stylish form table tabs text effect text scroller tooltips tree menu vertical navigation menu