homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Google / Google AdSense
Forum Library, Charter, Moderators: incrediBILL & jatar k & martinibuster

Google AdSense Forum

fixed DIV using CSS
any results?

 6:26 pm on Mar 28, 2005 (gmt 0)

Has anyone tried using fixed div's to statically position adsense ads on a page so that the position is fixed regardless fo scrolling? I know that this is a fairly simple concept to do with css, but with IE requiring a few hacks to get it to work nicely, I am afraid of breaking my current design to make a few extra bucks.




 6:34 pm on Mar 28, 2005 (gmt 0)

I think it's best to first contact Google about this. I'm not sure whether you will be allowed to use this technique as it will draw extra attention to your ads.


 6:39 pm on Mar 28, 2005 (gmt 0)

This is called a floating box.

Regardless if created by Javascript or by CSS, this is not allowed.

Somebody asked in an other thread Google about this.


 6:49 pm on Mar 28, 2005 (gmt 0)

well, i was assuming it is allowed since google allows framed ads (they give you the option that the ads will be placed on a framed page) when you are getting the code.

a fixed div would basically be achieving the same effect of a framed ad without actually using them

i am assuming that a flaoting box is one of those annoying boxes that popup over the content, a fixed div can be placed in the left or right hand side or the top or bottom giving the effect of a frame


 6:56 pm on Mar 28, 2005 (gmt 0)

I assume you were refering to a previous thread from about two years ago


I couldn't find anyone specifically finding that it wasn't allowed but maybe any updates to the TOS since then could clarify.

of course if it were placed in the same div/"frame" as a navigation menu or sidebar, it is not necessarily drawing attention to the ads.


 7:03 pm on Mar 28, 2005 (gmt 0)

winglian, I would disagree with it being the same as framed ads. Frames still exist in the same Z plane as your other content -- they don't occlude other text, they just don't necessarily scroll when something else scrolls. Floating boxes strike me as much more intrusive.


 7:14 pm on Mar 28, 2005 (gmt 0)

i am wondering if we are not talking about the same idea. I am assuming that the flaoting boxes are like those annoying ads that popup over your content and have an X over them so that you can close them. I am going for the "framed header" look like on [tagsoup.com...]

that can be achieved through css

other examples of fixed header/footer/sidebars can be found on



 7:20 pm on Mar 28, 2005 (gmt 0)

I was not hoping not to get into the, is this technique questionable to adsense debate, but hopefully seeking some response on the effectiveness of framed ads.

Maybe I should simply rephrase the question as: "Has anyone had better success with framed ads over inline ads?"

Implementation aside of how to achieve the "framed" effect, I would assume that a better CTR could/would/should be achieved since there is no above the fold/below the fold problems to worry about.


 9:43 pm on Mar 28, 2005 (gmt 0)

As long as you use CSS for your positioning (and not something like javascript, potentially changing Google's supplied code), Google doesn't seem to have a problem with fixed locations.

I have had specific email conversations with Adsense support about this (because of a layout bug in a site) and as long as neither the ads nor the content can ever overlay each other, they are fine with it.

Just be really careful and test various browser/resolution combinations to make sure it can never overlay. IE has a particularly nasty bug for not creating horizontal scroll bars properly that caught one of my sites (the layout bug I was discusssing with them) and only occurred when someone windowed their browser to less than 60 pixels wide, but apparently someone out there surfs like that and complained about it using the adsense feedback form....

Best fixed layout I've seen (and used) uses negative margins on the main content. Switching to that fixed my original layout issue and made Adsense support happy with it.

In many sites, especially those with long content pages and/or fixed menus already, including the adsense ads there makes a lot of sense.


 9:58 pm on Mar 28, 2005 (gmt 0)

What you're proposing sounds reasonable (and that solution appears to be much simpler than an implementation of same that I have on one of my sites).

Nonetheless I remember at least one person who was specifically told that fixed divs were not acceptable. That may have been due to the ad block being superimposed over portions of the web page, but it wouldn't hurt to ask anyway (and tell us what they say).


 5:58 am on Mar 29, 2005 (gmt 0)

There would be an other method.

If You have a navigation where the ad should be always and a content part higher than the screen,
You could make the content alone scrollable with <DIV overflow:auto


 2:50 pm on Mar 29, 2005 (gmt 0)

That is a good idea. Unfortunately I am using div's as block containers with the "float: left;" style which causes the overflow property of the parent div not to work. I sent off an email to google so I am awaiting a response.



 4:56 pm on Mar 29, 2005 (gmt 0)

+-------------+ <div style=overvlow:auto;height
navigation. :height from used window >
with.... scrollable content area
Adsense.. </div>


 6:01 am on Apr 3, 2005 (gmt 0)

I finally heard back from Google. To paraphrase their response, they said that fixed position divs are allowed as long as the pages are follow the basic adsense policies.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Google / Google AdSense
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved