Click to See Complete Forum and Search --> : stack div's


jonthegamer
09-11-2008, 07:04 PM
When you have pictures you can easily have them sit right beside each other. I am trying to figure out an easy way to do that with div tags (and whats inside them). I would prefer to not use positioning because I am still trying to figure out what sizes I want the images that appear inside them to be. For me I have 5 div tags that instead of being side to side, are one on top of the other.

Centauri
09-12-2008, 03:37 AM
Float them to the left :.classname {
float: left;
}The element that is to follow these should also get clear:both applied to its style.

jonthegamer
09-12-2008, 05:23 AM
thanks, if i give each div this it will also work
display:inline;

Centauri
09-12-2008, 05:42 AM
Yes, that does also work to stack horizontally, but it also does not allow you to set sizes if you need to.