Welcome to WebmasterWorld Guest from

Forum Moderators: incrediBILL & martinibuster

Message Too Old, No Replies

How to Set Height for Responsive Smart Size Ads?

Width is auto adjustable but can height be set



6:28 pm on Jan 9, 2014 (gmt 0)

10+ Year Member

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?


9:57 am on Jan 23, 2014 (gmt 0)

I got the same issue as you described.


12:33 am on Jan 24, 2014 (gmt 0)

5+ Year Member

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


10:34 am on Jan 24, 2014 (gmt 0)

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


8:45 am on Feb 14, 2014 (gmt 0)

I found a solution. It is quite simple.

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




2:41 pm on Feb 14, 2014 (gmt 0)

WebmasterWorld Senior Member Top Contributors Of The Month

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.


3:08 pm on Feb 14, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

@webcentric Thanks! very helpful. :)

Featured Threads

Hot Threads This Week

Hot Threads This Month