Social Media Magazine

Solution To Uncaught TagError In Google Adsense Advertisement

Posted on the 13 September 2015 by Pro Webguru @prowebguru

Recently I upgraded my theme version and after updating I faced following issue to one the adsense ad displayed on my website.

Uncaught TagError: adsbygoogle.push() error: No slot size for availableWidth=0

Basically there was one ad and there might be some style changes due to which my google adsense ads were not displayed. It was showing error "No slot size for availableWidth=0″.

This error occurs when google adsense ad code is trying to insert ad and if it doesn't find proper width to the parent container where its trying to insert ad.

I am using Mesocolumn theme and it was showing above error. Google adsense ads were not displayed only for Desktop version of the website. For mobile version it was showing proper ads. So I fixed this issue by modifying CSS. I added new CSS code.

Procedure to add new css/edit css is as - Goto Appearance -> Edit CSS and add following code. If you don't find Edit CSS option then just go and add following code to your stylesheet.

@media only screen and (min-width:800px)and (max-width:3000px) {
	#topbanner {
		width: 640px;
		height: 90px;
	}
}

This is specific to my theme. You need to tweak the width and you can also add media queries for other resolutions, if required.


Back to Featured Articles on Logo Paperblog

COMMENTS ( 1 )

By Sylvia Hartung
posted on 21 January at 11:42
Report spam/abuse

Magnificent beat ! I would like to apprentice while you amend your site, how can i subscribe for a blog web site? The account aided me a acceptable deal. I had been tiny bit acquainted of this your broadcast offered bright clear concept