<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to position ads responsively]]></title><description><![CDATA[<p dir="auto">The look of ads on PC they appear correctly but not on mobile.</p>
<p dir="auto"><img src="https://i.postimg.cc/v8h1j3jY/ads.png" alt="alt text" class="img-markdown  img-fluid" /></p>
<p dir="auto">Is there any <span class="glossary-wrapper" title="Cascading Style Sheets" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">CSS</span></span> we could use to position the ads and make them responsive (to not pass out the width div) for all pages like this one <a href="https://sopriza.com/question/songs-banned-radio-tv/" target="_blank" rel="noopener noreferrer nofollow ugc">https://sopriza.com/question/songs-banned-radio-tv/</a></p>
<p dir="auto">Thanks</p>
]]></description><link>https://sudonix.org/topic/393/how-to-position-ads-responsively</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 08:57:07 GMT</lastBuildDate><atom:link href="https://sudonix.org/topic/393.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 02 Dec 2022 09:03:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to position ads responsively on Fri, 02 Dec 2022 12:52:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sala" aria-label="Profile: Sala">@<bdi>Sala</bdi></a> Are your ads set to be responsive? You could use <span class="glossary-wrapper" title="Cascading Style Sheets" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">CSS</span></span>, but the images will in fact look worse as they will but cut short. My recommendation would be to follow the below</p>
<p dir="auto"><a href="https://support.google.com/google-ads/answer/7005917?hl=en-GB" target="_blank" rel="noopener noreferrer nofollow ugc">https://support.google.com/google-ads/answer/7005917?hl=en-GB</a></p>
<p dir="auto">Also, you should review this</p>
<p dir="auto"><a href="https://stackoverflow.com/questions/22463041/displaying-responsive-google-ads-css-problems" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/22463041/displaying-responsive-google-ads-css-problems</a></p>
<p dir="auto">If you really need something in the short term, you could use this</p>
<pre><code>@media (max-width: 767px) {
	#google-center-div img {
		width: 370px;
		margin-left: -420px;
		height: auto !important;
	}
}
</code></pre>
<p dir="auto">However, it’s worth noting that the <code>height</code> value is being set by <code>javascript</code> so changing it dynamically will not work with <span class="glossary-wrapper" title="Cascading Style Sheets" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">CSS</span></span> (it’s being overridden by <code>js</code>)</p>
]]></description><link>https://sudonix.org/post/4971</link><guid isPermaLink="true">https://sudonix.org/post/4971</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Fri, 02 Dec 2022 12:52:01 GMT</pubDate></item><item><title><![CDATA[Reply to How to position ads responsively on Fri, 02 Dec 2022 19:50:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phenomlab" aria-label="Profile: phenomlab">@<bdi>phenomlab</bdi></a> yes that’s the problem with these J’s, I will try my best , If I find something better I will share. Thanks</p>
]]></description><link>https://sudonix.org/post/4986</link><guid isPermaLink="true">https://sudonix.org/post/4986</guid><dc:creator><![CDATA[Sala]]></dc:creator><pubDate>Fri, 02 Dec 2022 19:50:20 GMT</pubDate></item><item><title><![CDATA[Reply to How to position ads responsively on Fri, 02 Dec 2022 19:30:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sala" aria-label="Profile: Sala">@<bdi>Sala</bdi></a> ok, fine, but I’d still recommend you go down the responsive ads route. The <span class="glossary-wrapper" title="Cascading Style Sheets" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">CSS</span></span> code will probably cause issues with other images as they are loaded within the Google ads code</p>
]]></description><link>https://sudonix.org/post/4984</link><guid isPermaLink="true">https://sudonix.org/post/4984</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Fri, 02 Dec 2022 19:30:44 GMT</pubDate></item><item><title><![CDATA[Reply to How to position ads responsively on Fri, 02 Dec 2022 19:13:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phenomlab" aria-label="Profile: phenomlab">@<bdi>phenomlab</bdi></a> Sir it has worked after I changed @media @phone {</p>
<p dir="auto">Wah! <img src="https://sudonix.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=ac92ab91795" class="not-responsive emoji emoji-android emoji--smile" style="height:1.4em;width:auto;vertical-align:middle" title="😄" alt="😄" /><img src="https://sudonix.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=ac92ab91795" class="not-responsive emoji emoji-android emoji--smile" style="height:1.4em;width:auto;vertical-align:middle" title="😄" alt="😄" /></p>
]]></description><link>https://sudonix.org/post/4983</link><guid isPermaLink="true">https://sudonix.org/post/4983</guid><dc:creator><![CDATA[Sala]]></dc:creator><pubDate>Fri, 02 Dec 2022 19:13:28 GMT</pubDate></item><item><title><![CDATA[Reply to How to position ads responsively on Fri, 02 Dec 2022 19:05:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sala" aria-label="Profile: Sala">@<bdi>Sala</bdi></a> Then you have to use responsive ads as I posted previously. Did you review those links?</p>
]]></description><link>https://sudonix.org/post/4981</link><guid isPermaLink="true">https://sudonix.org/post/4981</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Fri, 02 Dec 2022 19:05:35 GMT</pubDate></item><item><title><![CDATA[Reply to How to position ads responsively on Fri, 02 Dec 2022 18:57:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phenomlab" aria-label="Profile: phenomlab">@<bdi>phenomlab</bdi></a> Their widths still pass out the div.</p>
<p dir="auto">My actual ad code:<br />
&lt;div&gt;&lt;center&gt;Advertisement&lt;script async=“” src=“<a href="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-xx" target="_blank" rel="noopener noreferrer nofollow ugc">https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-xx</a>” crossorigin=“anonymous”&gt;&lt;/script&gt;&lt;!-- example_responsive_1 --&gt;<br />
&lt;ins class=“adsbygoogle” style=“display: inline-block; text-align:center; width: 100%; height: 280px;” data-ad-client=“ca-pub-xx” data-ad-slot=“xx” data-ad-format=“auto” data-full-width-responsive=“true”&gt;&lt;/ins&gt;<br />
&lt;script&gt;<br />
(adsbygoogle = window.adsbygoogle || []).push({});<br />
&lt;/script&gt;&lt;/center&gt;&lt;/div&gt;</p>
]]></description><link>https://sudonix.org/post/4980</link><guid isPermaLink="true">https://sudonix.org/post/4980</guid><dc:creator><![CDATA[Sala]]></dc:creator><pubDate>Fri, 02 Dec 2022 18:57:15 GMT</pubDate></item><item><title><![CDATA[Reply to How to position ads responsively on Fri, 02 Dec 2022 18:48:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sala" aria-label="Profile: Sala">@<bdi>Sala</bdi></a> Don’t turn it off, but do clear the cache.</p>
]]></description><link>https://sudonix.org/post/4978</link><guid isPermaLink="true">https://sudonix.org/post/4978</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Fri, 02 Dec 2022 18:48:10 GMT</pubDate></item><item><title><![CDATA[Reply to How to position ads responsively on Fri, 02 Dec 2022 18:47:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phenomlab" aria-label="Profile: phenomlab">@<bdi>phenomlab</bdi></a> it’s replaced, should I turn off wp rocket?</p>
]]></description><link>https://sudonix.org/post/4977</link><guid isPermaLink="true">https://sudonix.org/post/4977</guid><dc:creator><![CDATA[Sala]]></dc:creator><pubDate>Fri, 02 Dec 2022 18:47:33 GMT</pubDate></item><item><title><![CDATA[Reply to How to position ads responsively on Fri, 02 Dec 2022 18:19:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sala" aria-label="Profile: Sala">@<bdi>Sala</bdi></a> Try replacing with</p>
<pre><code>@media (max-width: 767px) {
	#google-center-div img {
		width: 370px !important;
		margin-left: -420px !important;
		height: auto !important;
	}
}
</code></pre>
]]></description><link>https://sudonix.org/post/4976</link><guid isPermaLink="true">https://sudonix.org/post/4976</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Fri, 02 Dec 2022 18:19:52 GMT</pubDate></item><item><title><![CDATA[Reply to How to position ads responsively on Fri, 02 Dec 2022 18:18:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phenomlab" aria-label="Profile: phenomlab">@<bdi>phenomlab</bdi></a> the above <span class="glossary-wrapper" title="Cascading Style Sheets" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">CSS</span></span> code is still inserted while am searching for other options. Or Maybe it’s my mobile phone? Have you tested on your mobile if it’s working?</p>
]]></description><link>https://sudonix.org/post/4975</link><guid isPermaLink="true">https://sudonix.org/post/4975</guid><dc:creator><![CDATA[Sala]]></dc:creator><pubDate>Fri, 02 Dec 2022 18:18:58 GMT</pubDate></item><item><title><![CDATA[Reply to How to position ads responsively on Fri, 02 Dec 2022 13:29:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sala" aria-label="Profile: Sala">@<bdi>Sala</bdi></a> that’s odd - it works when targeting your site.</p>
<p dir="auto"><img src="/assets/uploads/files/1669987790516-b81b961d-7389-42b7-938f-6f353873d9e8-image-resized.png" alt="b81b961d-7389-42b7-938f-6f353873d9e8-image.png" class="img-markdown  img-fluid" /></p>
]]></description><link>https://sudonix.org/post/4973</link><guid isPermaLink="true">https://sudonix.org/post/4973</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Fri, 02 Dec 2022 13:29:51 GMT</pubDate></item><item><title><![CDATA[Reply to How to position ads responsively on Fri, 02 Dec 2022 13:28:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phenomlab" aria-label="Profile: phenomlab">@<bdi>phenomlab</bdi></a> Looks like i will have to dig on this one, because the above <span class="glossary-wrapper" title="Cascading Style Sheets" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">CSS</span></span> code didn’t work. Thanks for trying!</p>
]]></description><link>https://sudonix.org/post/4972</link><guid isPermaLink="true">https://sudonix.org/post/4972</guid><dc:creator><![CDATA[Sala]]></dc:creator><pubDate>Fri, 02 Dec 2022 13:28:32 GMT</pubDate></item><item><title><![CDATA[Reply to How to position ads responsively on Fri, 02 Dec 2022 12:52:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sala" aria-label="Profile: Sala">@<bdi>Sala</bdi></a> Are your ads set to be responsive? You could use <span class="glossary-wrapper" title="Cascading Style Sheets" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">CSS</span></span>, but the images will in fact look worse as they will but cut short. My recommendation would be to follow the below</p>
<p dir="auto"><a href="https://support.google.com/google-ads/answer/7005917?hl=en-GB" target="_blank" rel="noopener noreferrer nofollow ugc">https://support.google.com/google-ads/answer/7005917?hl=en-GB</a></p>
<p dir="auto">Also, you should review this</p>
<p dir="auto"><a href="https://stackoverflow.com/questions/22463041/displaying-responsive-google-ads-css-problems" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/22463041/displaying-responsive-google-ads-css-problems</a></p>
<p dir="auto">If you really need something in the short term, you could use this</p>
<pre><code>@media (max-width: 767px) {
	#google-center-div img {
		width: 370px;
		margin-left: -420px;
		height: auto !important;
	}
}
</code></pre>
<p dir="auto">However, it’s worth noting that the <code>height</code> value is being set by <code>javascript</code> so changing it dynamically will not work with <span class="glossary-wrapper" title="Cascading Style Sheets" data-bs-toggle="tooltip" data-bs-placement="top"><span class="glossary-word">CSS</span></span> (it’s being overridden by <code>js</code>)</p>
]]></description><link>https://sudonix.org/post/4971</link><guid isPermaLink="true">https://sudonix.org/post/4971</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Fri, 02 Dec 2022 12:52:01 GMT</pubDate></item></channel></rss>