css - Set max height of Adsense responsive ad unit -
css - Set max height of Adsense responsive ad unit -
i had 2 x (300x250) adsense advertisement units in right side bar of site
i have made site responsive , replaced these advertisement units adsense responsive advertisement units.
the problem have adsense serving 2 x (300x600) advertisement units. adsense tos state can serve 1 (300x600) advertisement unit per page
the max width getting picked adsense responsive advertisement units.
but when seek , set max-height of parent div 250px, limit number of 300x600 ads per page, max-height gets ignored , adsense still displays 300x600
has else encountered problem , if so, how did manage set max-height of responsive advertisement unit?
thanks in advance,
kes
you alter data-ad-format="auto"
data-ad-format="rectangle"
. (see advanced features > horizontal shape example.)
i think should not define height
(max-height
) on parent div
.
ad height (automatically) determined adsbygoogle.js
(that smart sizing) , if want command advertisement height need utilize data-ad-format
("rectangle", "vertical", "horizontal" or preferred combination "rectangle,horizontal").
or (not recommended) "downgrade" advertisement code (by removing data-ad-format
attribute) , specify exact size(s) @media
queries. (see exact size example.)
css responsive-design adsense
Comments
Post a Comment