I have an image of width 150 pixels, whose parent container is set to float:left. I want the adjacent text to have a margin equal to the width+margin of the floated box, only if the floated box is present.
<figure style="float:left; margin:10px 15px 0 0" /><img src="avatar.png" /></figure>
<div class="description">Description goes here. I need it to not wrap under the floated image, just the right of it</div>
If you apply overflow:hidden; to your div.description it will restrict the text from wrapping under the float when the float is present.
This topic is now closed. New replies are no longer allowed.