Fixing Adsense Injecting 'height: auto! important' - Solution In blogger Platform - CodeGenius

Breaking

Home Top Ad

Responsive Ads Here

Post Top Ad

Responsive Ads Here

Saturday 18 March 2023

Fixing Adsense Injecting 'height: auto! important' - Solution In blogger Platform

Fixing Adsense Injecting 'height: auto! important' - Solution In blogger

If you're using Google AdSense on your Blogger blog and see ads injected with "high: auto ! important" in the style attribute, you can add a simple CSS rule to your blog template.

This is how you can do it:

  1. Go to your Blogger control panel's "Theme" section and click "Edit HTML."
  2. Look at the following code:
  3. Add the following code just below the existing code:
  4. Save the template and voila!

This CSS rule will only apply to screens with a maximum width of 768 pixels (which covers most mobile devices) and is set by AdSense to ensure that ads are responsive and fit within the available space. It will override the "height" property.


=>Please note that this solution is specific to Blogger and may not work on other platforms. 

No comments:

Post a Comment

Post Bottom Ad

Responsive Ads Here

Pages