I'm looking to position two divs next to each other, with the second div starting right where the first one ends. I came across a similar question on Stack Overflow, but unfortunately, it didn't have the answer I needed.
<div id="wrapper">
<div id="div1">The issue arises when the first line wraps, causing the second div not to appear properly.</div>
<div id="div2">They should be positioned side by side.</div>
</div>
#div1 {
float:left;
display: inline-block;
}
#div2 {
float:left;
display: inline-block;
}
Here's an example on JSFiddle that I tried out...
The goal is for the second div to start exactly where the first div ends, even if it crosses into a new line midway through a word.