1 reply [Last post]
GAZ082
Offline
newbie
Buenos Aires, Argentina
Last seen: 14 years 37 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:

http://flickr.com/photos/gabrielzorrilla/219224135/

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
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 17 weeks ago
London
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.
http://www.csscreator.com/attributes/containedfloat.php

Hugo.

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