Here are some ways to do this. First of all, you can use display: inline-block; or float: left; to make divs sit side by side. They work differently, so be sure to use the correct option for your case.
Secondly, none of them will work if the containing div (a) is large enough to contain both divs on the same line. Or you can use overflow: hidden; in containing div (a).
Edit:
I updated your example: http://jsfiddle.net/uVqG6/11/
I had to use white-space: nowrap; since there were wraps inside the div.
Here is another answer that also answers your question: CSS: how to stop text from more than one line?
Remember that using display: inline-block basically treats the element as text, so most CSS formatting properties will apply to it.
Christopher harris
source share