Ezilon.com - Target Your Audience, be Seen in Your Region

How Do I Position Adsense With CSS?

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

They have: 43 posts

Joined: Sep 2005

Hey All,

I use google's adsense on my site, and I've been trying to find out how to put all the google javascripts at the bottom of the html, but still have the ads appear in the right places (banner, margin).

I tried absolute positioning but then the ads show up under the footer. Of course, I could have written it wrong:
In my css:
navad {
position: absolute;
top: 200px;
left: 14px;
}

In my html, just above /body:

BTW, my site has 5 main divs: two margins, header, content and footer.

Anybody now how to do this? TIA!

Renegade's picture
Moderator

He has: 2,944 posts

Joined: Oct 2002

Firstly, you forgot the # in your CSS, so, it should be

#navad {
position: absolute;
top: 200px;
left: 14px;
}

'

Secondly, the HTML is wrong, try:

<div id="navad"><javascript stuff></div>

'

Cheng Eu Chew - Renegade
Download:
- Mozilla, Firefox
- Opera
This post may contain peanut traces

They have: 43 posts

Joined: Sep 2005

Ah, thanks. I only understand css by experimentation and comparisons between pre-made templates, so my understanding is incredibly fragmented.

So I now I'm able to position javascripts way at the bottom.

Thx again!