Stick google ad to the bottom

Hello everyone,
Take a look at this page:

How can i make the google ad stick to the footer all the time?

Note that content area can sometimes be bigger than the right side like on this page:

So i guess position absolute is not an option?

Any suggestions?

You could try adding something like this to your CSS:

#main {
  position: relative; 
  padding-bottom: 100px;

#bottomAd {
  position: absolute; 
  bottom: 0;

The bottom padding is needed to prevent overlap of ad and content when there’s a lot of content in the main column.

but your solution puts an extra 100px space on the #right div when its not needed. :slight_smile:

<snip> have a look on this page i also use adsense in the footer just open your root folder and go to wp-content then themes and after that choose whatever theme you want and after that just edit footer.php and add your ad sense code in the upper of all codes simple done.

If you find out how to keep your cake and eat it too, let me know! :slight_smile:

If you find out how to keep your cake and eat it too, let me know!

I could do that if i could manage making my #left element 100% height :slight_smile:

Even if it were that tall, the ad would not go to the bottom by itself. I knew you wouldn’t like the gap at the bottom, but it was the only reliable way I could think of.

well I added margin-bottom:-100px to the #right element and it gave me the desired effect, but is it a good way to achieve it ?

Seems to work OK. Good idea. :slight_smile: (I’ve only tested it in one browser, though.)

As long as the right column is always to the right of the ad then the negative margin will work fine as the right column will just get pulled into the extra padding that was added.