PDA

View Full Version : Placing an advertising unit inside a text block


IdentityCrisis
06-13-2005, 03:19 PM
Is there a way in CSS to place an advertising unit (or any layer) inside a text layer and have the text wrap around it?

For example, I have a text layer that is 325 pixels wide. I would like to place an ad inside that text layer that is 300 pixels wide. This ad unit I want 500 pixels from the top of the browser.

I would also like the text in the text layer to wrap around it.

Here's an example of how it would look

XXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXX

A D V E R T I S E M E N T
A D V E R T I S E M E N T
A D V E R T I S E M E N T

XXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXX

Is this possible? I've tried using a float, and giving the layer a top margin of 500px, but it just leaves that 500px blank and has ALL the text underneath the ad.

Thanks

IC

mrruben5
06-13-2005, 03:25 PM
Because you want the ad to appear 500 px from the top of the browser, you have to use absolute positioning, but because you take the ad out of the normal document flow with that, text will float behind or before it. No way of wrapping text around something that has an absolute positioning.