1 reply [Last post]
Buenos Aires, Argentina
Last seen: 16 years 7 weeks ago
Buenos Aires, Argentina
Joined: 2006-08-20
Posts: 1
Points: 0

Hi! I'm trying to get text wraping around an image located on the right of the post (I'm using WP). The result is this:


As you can see, the image is outside of the post's div. I tried some solutions from other posts here, but nothing seems to work.

Some help would be greatly appreciated. Thanks!

Hugo's picture
Last seen: 7 years 39 weeks ago
Joined: 2004-06-06
Posts: 15668
Points: 2806

999th reply on the subject :)

Screen shots are of little use they tell us what you have already described; code or links please!

If your dealing with floats then it is almost certainly one of two misunderstandings of how floats work firstly the float needs to come first in the source order i.e before say the paragraph text and the floats container must be cleared if you want it to envelope/extend to surround the float and other content. Floats are designed to escape the parent element try adding overflow:hidden or display:table to the element holding the image and associated text IE requires either height or width of any degree to force containment if neither can be supplied one can use display:inline-block but re-set the display back to block on a repeated ruleset for the same element, this will also fix any problems in IE7.

I would spend a little time and read up on float properties and also check the clearing contained floats link from this forum.


Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me