Forum Moderators: not2easy

Message Too Old, No Replies

Loading Content Into An Earlier DIV Block

         

pubdougx

2:26 pm on Sep 30, 2010 (gmt 0)

10+ Year Member



Hi Folks,

Stumped on a CSS placement isssue.

Is it possible to use CSS to target a specific DIV container that appears earlier in the page code? For example, a page layout like this:

[contentblock1] - variable length content. ie. a story.

[div adblock] - fixed h/w sized div where an ad will appear.

[contentblock2] - more variable length content.

[div adcode] - javascript or whatever, coded at the very end of the HTML page which will load an ad that should appear in the [div adblock] section.

I know I can use CSS positioning options in the [div adcode] section to specify exactly where on the *page* I'd want it to appear, but since the [div adblock] wouldn't necessarily be in the exact same position on the page every time, that wouldn't work.

Thanks in advance!

-- Doug.

enigma1

11:15 am on Oct 5, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I believe you can make it appear above or below the div adblock, float the div adcode and try using negative vertical margin and not absolute positioning.