Stopping Text From Wrapping Around Image
I am destroying my mind trying to get this styling done right. I have a fixed size image with an unpredictable height div of text to the right of it. I want the top of the text t
Solution 1:
This should do the trick.
<divstyle="margin-left: 132px">Text</div>
To have space between the text and the image, make the margin larger or add a padding-left
.
Solution 2:
DanielB's answer nails it, but I just like giving alternative solutions; never know if it might come in handy. You could put the image and the div into a container with a fixed width, set a fixed width on the image and div that adds up to the container's width, and float the div as well.
<div id="container">
<img height='231px' width='123px' style='float:left' />
<div>Text</div>
</div>
#container div
{
float:left;
width: 123px;
}
#container {
width:246px;
}
Post a Comment for "Stopping Text From Wrapping Around Image"