How can I place two CSS elements vertically side by side?
You can first “float:left” both element1 and element2, then use margin to adjust the location of the element on the right side.
For example: ———————————————————————————- div.element1 { float: left; }
div.element2 { float: left; margin: 0 0 0 10px; }
Log in to answer.
smallwei 9:22 pm on October 12, 2009
You can first “float:left” both element1 and element2, then use margin to adjust the location of the element on the right side.
For example:
———————————————————————————-
div.element1 {
float: left;
}
div.element2 {
float: left;
margin: 0 0 0 10px;
}