Title: Styles removed from code
Last modified: September 18, 2023

---

# Styles removed from code

 *  Resolved [little_bird](https://wordpress.org/support/users/little_bird/)
 * (@little_bird)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/styles-removed-from-code/)
 * Hi,
 * I am following this Google guidance for adding some extra CSS for mobile devices
   [https://support.google.com/adsense/answer/9183363?hl=en#zippy=%2Cexpandable-width-with-fixed-height-example](https://support.google.com/adsense/answer/9183363?hl=en#zippy=%2Cexpandable-width-with-fixed-height-example)
 * So according to the guidance, I added this code through the plugin
 *     ```wp-block-code
       <style>
       @media(max-width: 480px){.resp-ad{max-width: 414px;}}
       @media(max-width: 414px){.resp-ad{max-width: 348px;}}
       @media(max-width: 375px){.resp-ad{max-width: 329px;}}
       @media(max-width: 360px){.resp-ad{max-width: 314px;}} 
       </style>
       <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
       <!-- XXXXXXXX -->
       <ins class="adsbygoogle .resp-ad"
            style="display:block"
            data-ad-client="xxxxxxxxxxxxxx"
            data-ad-slot="xxxxxxxxxxxxx"
            data-ad-format="auto"
            data-full-width-responsive="true"></ins>
       <script>
            (adsbygoogle = window.adsbygoogle || []).push({});
       </script
       ```
   
 * The class is added to the ads but the style definitions are not applied, I don’t
   see them anywhere in the frontend. How can I make this work?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fstyles-removed-from-code%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/styles-removed-from-code/#post-17059157)
 * The plugin inserts the code as configured. To check your website you need to 
   provide some data:
   [https://wordpress.org/support/topic/ad-inserter-support-forum-before-you-ask-for-help/](https://wordpress.org/support/topic/ad-inserter-support-forum-before-you-ask-for-help/)
 *  Thread Starter [little_bird](https://wordpress.org/support/users/little_bird/)
 * (@little_bird)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/styles-removed-from-code/#post-17059466)
 * Thanks for your answer.
 * The issue was a related to cache and the plugin Autoptimize. Now after clearing
   all the caches the styles are applied.
 * Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Styles removed from code’ is closed to new replies.

 * ![](https://ps.w.org/ad-inserter/assets/icon-256x256.jpg?rev=1502039)
 * [Ad Inserter - Ad Manager & AdSense Ads](https://wordpress.org/plugins/ad-inserter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ad-inserter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ad-inserter/)
 * [Active Topics](https://wordpress.org/support/plugin/ad-inserter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ad-inserter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ad-inserter/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [little_bird](https://wordpress.org/support/users/little_bird/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/styles-removed-from-code/#post-17059466)
 * Status: resolved