I have a set of images aligned using the below CSS but they are being placed top to bottom. How do I align them left to right?
In other words:
1|2|3|4
5|6|7|8
vs
1|3|5|7
2|4|6|8
#photos {
line-height: 0;
-webkit-column-count: 5;
-webkit-column-gap: 0px;
-moz-column-count: 5;
-moz-column-gap: 0px;
column-count: 5;
column-gap: 0px;
}
#photos img {
width: 100% !important;
height: auto !important;
}
This is from the turtorial: http://css-tricks.com/seamless-responsive-photo-grid/
It depends on what you are trying to accomplish. If you are really stuck on using HTML5 you should consider the fact that this won’t work in all browsers, or all browser versions. If you are simply trying to make a block of images with no seams and have them stack in a row see the following.