homepage Welcome to WebmasterWorld Guest from 54.237.184.242
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 & jatar k & martinibuster

Google AdSense Forum

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




msg:4636213
 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?

 

Zivush




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

I got the same issue as you described.

jojy




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

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

Zivush




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

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

Zivush




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

I found a solution. It is quite simple.

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

AD CODE HERE

</div>

webcentric




msg:4645249
 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)

data-ad-format="auto">

These options are available

data-ad-format="rectangle">
data-ad-format="vertical">
data-ad-format="horizontal">

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.

hannamyluv




msg:4645255
 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