homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Google / Google AdSense
Forum Library, Charter, Moderators: incrediBILL & martinibuster

Google AdSense Forum

How to Set Height for Responsive Smart Size Ads?
Width is auto adjustable but can height be set

10+ Year Member

Msg#: 4636211 posted 6:28 pm on Jan 9, 2014 (gmt 0)

I'm currently using the advanced settings Adsense code with @media to set Adsense width and height on my responsive site eg. (750w by 200h) (300by250) - that works fine

I tried the smart size ad code and the ad units showed fine at various widths with their container div set to 100% - however the height does not seem to be adjustable (seemed to be stuck on 90px). Tried setting height:200px in the ad container div css but all it did was leave a bottom white space.

Any one know if the smart size code can specify a height?



Msg#: 4636211 posted 9:57 am on Jan 23, 2014 (gmt 0)

I got the same issue as you described.


5+ Year Member

Msg#: 4636211 posted 12:33 am on Jan 24, 2014 (gmt 0)

I changed it to text ads only and this issue is resolved now


Msg#: 4636211 posted 10:34 am on Jan 24, 2014 (gmt 0)

It's not an option if you want image and text ads.


Msg#: 4636211 posted 8:45 am on Feb 14, 2014 (gmt 0)

I found a solution. It is quite simple.

<div style="width:100%; display: inline-block">




WebmasterWorld Senior Member Top Contributors Of The Month

Msg#: 4636211 posted 2:41 pm on Feb 14, 2014 (gmt 0)

For a bit more control over smart sized ads, the following values are available for the following line in the Smart Size script (per Google)


These options are available


Added: This helps prevent problems like getting a 600 pixel tall ad in a space where you only want a horizontal banner or square ad. Also has the effect of forcing taller ad units where you want them. Keep in mind this is scaling to the size of the container. You can also try setting the max-width and max-height of your containers to control how much space the ad consumes.


WebmasterWorld Senior Member 10+ Year Member

Msg#: 4636211 posted 3:08 pm on Feb 14, 2014 (gmt 0)

@webcentric Thanks! very helpful. :)

Global Options:
 top home search open messages active posts  

Home / Forums Index / Google / Google AdSense
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved