Forum Moderators: not2easy

Message Too Old, No Replies

Probably A Simple Positioning Problem

         

rjbearcan

3:42 am on Aug 19, 2007 (gmt 0)

10+ Year Member



Hello everyone,
I am currently in the midst of replacing tables in my website with CSS, something I know I should have done a long time ago but my lack of CSS knowledge made me hesitate.

I am having a positioning problem: can I position a div relative to another div? What I am did is create a div with position:absolute and when I went to put my Adsense code after the div, I just used a <p>Adsense code</p> figuring that would work. My ads are now over the div I created. Since I am not sure how long my div will be, the height will vary, what can I do to make sure my ads are positioned after the div and I can continue coding the rest of the page?

Sorry if this sounds too confusing.

dreamcatcher

11:03 am on Aug 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try using:

clear:both

For your positioned div.

dc

londrum

11:47 am on Aug 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



position:absolute takes something out of the flow of the document. so nothing else will pay attention to it.

you'll either have to change it to position:relative, or put the block of adsense code inside the same div.

rjbearcan

3:27 am on Aug 20, 2007 (gmt 0)

10+ Year Member



Thanks for your help, I was able to get what I wanted accomplished just in an ugly way. I haven't played around with CSS positioning enough to know what I am doing.