<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1083331" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1083331</link>
    <description></description>
    <language>en</language>
          <item>
    <title>You could use CSS transforms</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/how-make-ads-responsive#comment-1290728</link>
    <description> &lt;p&gt;You could use CSS transforms to scale down the ads to fit the screen. This isn&#039;t an exact science, and can be tricky to get right. I have done this a little bit to get ads to fit on the screen better. However, when advertisers pay for a certain size ad, they usually expect it to appear at that size and not shrunken down. Resizing them might be against the TOS of your ad networks. &lt;/p&gt;
&lt;p&gt;So, I think if you want to offer responsive ads, getting that script to work would be the best bet (sorry I can&#039;t help there).&lt;/p&gt;
&lt;p&gt;On the other hand, I usually find that publishers want to run different ad sizes in different positions on mobile. The classic example is the sidebar rectangle: That&#039;s a strong position on a typical site on desktop, but on mobile it&#039;s going to bump way down below the content. I also usually find that advertisers want to buy separately for mobile too.&lt;/p&gt;
&lt;p&gt;The networks my clients work with always provide different tags for desktop/mobile, and we use our ad server to target them separately. I have a little bit of responsive CSS just to make sure things don&#039;t get messed up if anyone is resizing their browser.&lt;/p&gt;
&lt;p&gt;If I understand how this is working, I don&#039;t think your code is going to work. I think those scripts need to fire on page load, right? Then load the iframe with the ad in it. When you swap out the script tags in your script, does the new tags.js script actually load and do anything?&lt;/p&gt;
&lt;p&gt;An alternate approach could be to use device detection to serve the 728x90 tags.js script to desktop/tablet and serve the mobile script to mobile. You&#039;d need to get a library for device detection which could be a pain to keep updated (that&#039;s why we let DFP do that!). Then put in some media queries just to make sure the desktop ads don&#039;t show on small screens and vice versa.&lt;/p&gt;
&lt;p&gt;There are some networks that do offere Responsive ads, and it is possible to do it in DFP, but I don&#039;t have experience with that.&lt;/p&gt;
 </description>
     <pubDate>Tue, 17 May 2016 21:05:50 +0000</pubDate>
 <dc:creator>Megan</dc:creator>
 <guid isPermaLink="false">comment 1290728 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
