howto: google ads and responsive design rev 5 nov 2018 ....................................................... do: * Give the ins tag a class, so you can target it with media queries. * Specify horizontal shape (like banner) even on mobile: data-ad-format="horizontal" By default is "auto". ( source: https://support.google.com/adsense/answer/7445870 ) Doesn't work for me though. fsff [5 nov 2018] * using external stylesheet - not possible? - "Note: Setting the size of the ad code via CSS in external style sheets is not officially supported." ( sec "Specify an exact size per screen width" https://support.google.com/adsense/answer/6307124 ) - "If the ads are served in an iframe then I don't see how you can apply an external stylesheet to it that originates from the document that contains the iframe." * using any kind of style changing - not possible? i've spent 3 days on this thing. I've read all the google documentation, i think i'm reasonably smart, i can't get it to work. As long as it can take over the entire width, [5 nov 2018] ....................................................... sources: * This is specific to a theme, but may be useful: https://themegrill.com/support-forum/topic/colormag-header-google-responsive-ads/ * About responsive ad units https://support.google.com/adsense/answer/3213689 * How to modify your responsive ad code https://support.google.com/adsense/answer/6307124 * How to use responsive ad tag parameters https://support.google.com/adsense/answer/7445870 change the behaviour of your responsive ad unit. 1. Specify a general shape that your ad unit should conform to. (such as, so ad won't go portrait mode on mobile) 2. Set the behaviour of full-width responsive ads on mobile devices, if you don't want it to go full-screen. * 6 Best Practices for [making] Responsive Ads on the GDN https://www.wordstream.com/blog/ws/2018/07/23/responsive-display-ads jul 2018 This is for ad makers, but gives an idea how Google is doing this, and some other info: * Ads aren't really responsive, they just come in different sizes, and google serves the size tht fits the container. * Not all advertisers will provide responsive ads. ....................................................... Notes: * Best way to deal with google ads is to select "responsive" when making them at google adsense. https://support.google.com/adsense/answer/3543893?hl=en There is more info there and in separate file if you have more complex responsive needs for google ads. * Use Chromium instead of Chrome - less google invasion, same functionality. but you can minimise cache through developer tools only. * Do not expect everything to look pixel-perfect. You are doing Web, not designing a book or a poster. Browser engines, screens, OSs, room lighting, more, are all different. So you are flexible, flowing, be water my friend. _______________________________________________________ i hate google i hate google i hate google i hate google begin 3 nov 2018 -- 0 --