How do I prevent one div from wrapping beneath another? Specifically, I want the 2nd div to always be to the right of the 1st div, even if the browser width is resized such that the 2nd div's contents must wrap.
I always want the divs to be side by side:
and to never look like this, even if the browser window is resized such that the 2nd div's contents must wrap:
<!DOCTYPE html>
<html lang="en">
<body>
<div class="columns">
<div style="background-color: #990000; width:70px; float: left">
Pic
</div>
<div style="background-color: #00FF00; float: left; " >
body some interesting large amount of content. some interesting large amount of content.
</div>
</div>
</body>
</html>
<div class="columns">
<div style="background-color: #990000; width:70px; float: left">
Pic
</div>
<div style="background-color: #00FF00; margin-left: 70px;" >
body some interesting large amount of content. some interesting large amount of content.
</div>
</div>
An example: http://jsfiddle.net/arPzt/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With