cellsByColumn
A horizontal grid layout where items are centered inside each cell. The grid is defined by columnWidth
and rowHeight
options.
Install
This layout mode is not included in isotope.pkgd.js and must be installed separately.
Download cells-by-column.js on GitHub.
Install with Bower:
bower install isotope-cells-by-column
npm install isotope-cells-by-column
Options
rowHeight
The height of a column of the vertical grid.
If rowHeight
is not set, the outer height of the first element will be used.
layoutMode: 'cellsByColumn',
cellsByColumn: {
columnWidth: 110,
rowHeight: 110
}
If set to an Element or Selector String, Isotope will use the height of that element. See Element sizing. Setting rowHeight
with element sizing is recommended if you are using media queries to change the size of items.
layoutMode: 'cellsByColumn',
itemSelector: '.grid-item',
percentPosition: true,
cellsByColumn: {
columnWidth: '.grid-sizer',
rowHeight: '.grid-sizer'
}
.grid-item { height: 13%; }
.grid-item--height2 { height: 23%; }
/* isotope element option sizing */
.grid-sizer {
width: 110px;
height: 25%;
}
columnWidth
The width of a column of the horizontal grid.
If set to an Element or Selector String, Isotope will use the width of that element. See Element sizing. Setting columnWidth
with element sizing is recommended if you are using percentage widths or media queries to change the size of items.
If columnWidth
is not set, the outer width of the first element will be used.
See examples above.