Div’s will by default list themselves one under the other unless you apply CSS properties to them.
Here we show the best practice for placing divs on the same line.
There are two recommended methods for placing divs on one line. Floating them is the standard method. And displaying them inline is the other.
We recommend not to use either absolute positioning or putting the divs inside a <nobr> tag. The <nobr> tag is deprecated and with absolute positioning they are stuck to a static position. We always recommend never to use absolute positioning unless it is absolute necessary.
Floating: Add something like this to your CSS:
Inline: Add the following property to your CSS:
This should work. Further attributes may need to be added to them depending on what you want to do with them.
Note though that display:inline is not a block. you will not be able to define its width or height nor apply vertical margins/padding.