I want to put several div
s next to each other (in one row). All div
s have the same height.
Here is how this can be done using float: left
.
Is that can be done without using float
?
I want to put several div
s next to each other (in one row). All div
s have the same height.
Here is how this can be done using float: left
.
Is that can be done without using float
?
You could use display:inline-block. But unfortunately some browsers (some IE versions) don't support it.
a display: block
element is (effectively) going to have a line break at the end. One option that will let you keep block element styles, while putting it in the pageflow is set display: inline-block
(of course, with some additional work to get ie behaving)
Another option is to nest them, set them all to position: relative
, and use the left
rule to align them.
Depends, on what you want to do.
You can use display: inline-block;