How to get two divs to stay on one line?

Status
Not open for further replies.


you won't be able to set a width if you display them inline

if you want to display block you will need to float:left the first one and give it a width
 
float:left, and if those 2 divs are inside another div and you want that div's height to scale with those 2 div's you need to float it as well.
 
<div style="float:left">Blah Blah</div><div style="float:left">Blah2 Blah2</div>

will be:

Blah blah blah2 blah2
 
Status
Not open for further replies.