if it show, then the ad is working.
however you’re asking for something that is not theme related, must be the adsense code issue.
try clear cache maybe..
Thread Starter
cloe89
(@cloe89)
i’ve tried. But the ad doesn’t show in desktop.
the ad code works correctly in any other theme.
no idea.
if resize the browser to 700px below and refresh, the ad will show.
try add this to theme option->custom css
#topbanner {width:728px;height:90px;}
Thread Starter
cloe89
(@cloe89)
if i add that code, the ad lose the responsiveness..
but if you add the css and refresh the site, did the ad code appearead?
could you at least try first?
i want to know if adsense code need to check the div width for responsive..the current #topbanner did not have width set in css..
so please try the css code first and let me know..
Thread Starter
cloe89
(@cloe89)
hi, obviously i’ve tried. if i put the code, the ad shows but it loses responsiveness.
i see, so the google responsive code ‘needed’ the div width to work. try add this to theme option->custom css
/*desktop*/
@media only screen and (min-width:800px)and (max-width:3000px){
#topbanner {width:728px;height:90px;}
}
/*ipad*/
@media only screen and (min-width:400px)and (max-width:780px){
#topbanner {width:468px;height:60px;}
}
/*iphone*/
@media only screen and (min-width:240px)and (max-width:390px){
#topbanner {width:300px;height:250px;}
}
Thread Starter
cloe89
(@cloe89)
it works, but it’s not perfect with all the devices (see http://www.responsinator.com/?url=www.viaggiosocial.it%2F). can we improve the code?
you will need to experiement and tweak the min-width, max-width and the suitable ad width and height to show in particular dimension.
maybe height: auto; on the last iphone code.