0

I can't seem to float my image and the text does not wrap around it. I've tried clear:both but it doesn't seem to work.

#tree {
    width:175px;
    height:250px;
    float:right;
    margin-left:20px;
    margin-top:24px;
}

#blackwhite {
    width:200px;
    height:125px;
    float:left;
    clear:both;
    margin-right:20px;
    margin-top: 100px;

}

Thank you for your help in advance!

2 Answers 2

1

Without seeing the related html, it's hard to say. As a shot in the dark, though: a floating object will float to the left or right of the element which follows it. Don't use clear unless you want it to show up entirely below the elements before it. If you wanted an image to float to the left and have text wrapping around it on the right, you might try something like this:

<img class='right' src='image.jpg' alt='' style='float:left;'/>
<p>Here's the text that will wrap around the image that is floating to the left.</p>
Sign up to request clarification or add additional context in comments.

Comments

1

if you clear:both; than you are saying that you don't want anything to be next to the item, on either side.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.