Google Ads static location

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Google Ads static location

Post by Todd_Z »

I want to add a googleads box on my site, but I want to have it stay in the bottom right hand corner of the screen, with an x on it to close it, just in case it overlaps site content - any ideas on how to make this happen?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

1) Stuff like that drives me nuts! I'd much rather have an ad take up a bigger chunk of a page, than have it scroll along with me.

2) The only solution I can think of is to put the ad in a div with a z-index of 1000 or so, so it floats over everything. Then in your body, use an onScroll function (or something similar, I'm not sure that function even exists), to move the div a certain number of pixels.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

I have to agree with pickle, i hate "designers" employing such tricks, its forcing me, the end-user, to see it when i dont want to, it only serves to annoy, please dont emply this
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

malcolmboston wrote:I have to agree with pickle, i hate "designers" employing such tricks, its forcing me, the end-user, to see it when i dont want to, it only serves to annoy, please dont emply this
Woah, re-read the original post - he includes a X to close it.. he's not trying to trick or force the user to see it, he's trying to make it a seamless element in the site.. and frankly, there's nothing wrong with that.

Imagine a "viewport" style wraparound site and it makes a ton of sense.. He's not trying to trick anyone - its part of his design.

(Not to mention, users who dislike ads can use the always excellent adblock extension for firefox).

But back on topic, I think you'd have to either do an iframe, and lock its position, or use a floating div with a z-index, like pickle suggested.
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Post by Todd_Z »

Ouch/thanks. I'm trying to figure out a non-googleads way to make some revenue on my site, but I'm running dry. I get 1500 unique visitors a day... that should count for something, i hope. Anyways, I'm just gonna have a box be static in the top right hand corner of the page, nothing too flashy. Thanks for the help though.
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Post by Todd_Z »

If anyone is curious to see how it turned out -> http://www.acdrifter.com
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post by phpScott »

I think you did a good job with the google adds on the side. They are there but blend nicely into the site. close option nice touch.

Could have just been my connection but the page took a very long time to load, more then 30 seconds. I waited to see how your site turned out but usually I wouldn't wait that long.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Error on line 117 -- Object does not support this property or method.
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Post by Todd_Z »

I have no idea whats going on with the 30 second wait... and its weird that you are getting an error message, because I never get that, all the js is google's...
Post Reply