Forum Moderators: martinibuster
I am curious if it is possible to display various formats depending of the user's screen resolution. In particular, i want to show a 468x60 ad to the users with 800x600 resolution and the leaderboard to all others.
I mean, i know how to detect the resolution with javascript and display the ads depending on that, but then i would have to modify the AdSense code a bit (enter an "if" statement in the second part of code) what is a no no according to Google.
Is there any way?
Thanks!
if (window.outerWidth < 900 ¦¦ document.body.clientWidth < 900) {
# set variables for banner
} else {
# set variables for leaderboard
}
But CHECK WITH GOOGLE THAT THIS IS ALLOWED. Arguably it's within the spirit but not the letter of the rules.