Click to See Complete Forum and Search --> : float:right; position:relative; left:100px


pen
06-11-2009, 10:07 AM
I have a div tag with the style below added.

<div style="position:relative; left:190px; bottom:130px; clear:both;float:right;margin:5px;padding:0px"><img src="../../images/penLogo.png" /></div>



In the div I have an img tag with an image. The text in the body of the page wraps around where the div was before it is moved and it doesn't matter the order of the styles. Is there a way to get the text to respect that the div has been moved and wrap around the new location?

pen
06-12-2009, 09:36 AM
From the silence I gather there is no solution to this.

dtm32236
06-12-2009, 10:10 AM
Hmmm. It probably has something to do with it being position:relative (but I'm not sure why). Do you have a link so we can see this in action?

pen
06-12-2009, 10:21 AM
http://www.paulneale.com/technical/roaryTheRacingCar/roaryTheRacingCar.html

It is the flower image that I was working with and noticed it, this image still uses the same method but I was trying it in other places and had to drop it. I didn't want to make it an absolute position as that is a pain.

dtm32236
06-12-2009, 10:37 AM
oh, gotcha.

Okay, what I would normally do here is create a transparent 'placeholder div' that will act as the area of overlap from the image. The div if floated right so that the text will wrap around it, and the image can stay as is.

That probably made no sense at all, so here's an attached image that will hopefully show you what I'm talking about.

And there may be better ways, but this is what i've come up with in the past and it seems to work out pretty well.