I have decided to create a masonry style layout using CSS3 for the columns, which has made building the layout easier and more precise. This is especially useful as I am working on a responsive design.
Currently, I am implementing CSS3 media queries to adjust the number of columns displayed based on the window size. What I would like to do next is animate the repositioning of elements within the columns when the number of columns changes due to resizing the window.
Below is an excerpt of my CSS code:
@media all and (min-width: 961px) and (max-width: 1599px){
#portfolio {
width:100%;
position:relative;
text-align:center;
-moz-column-count:4;
-moz-column-gap:3px;
-webkit-column-count:4;
-webkit-column-gap:3px;
column-count:4;
column-gap:3px;
}
}
@media all and (min-width: 1600px){
#portfolio {
width:100%;
position:relative;
text-align:center;
-moz-column-count:5;
-moz-column-gap:3px;
-webkit-column-count:5;
-webkit-column-gap:3px;
column-count:5;
column-gap:3px;
}
}
If anyone has suggestions on how to achieve this effect, I would greatly appreciate it. Thank you in advance!