Displaying / Styling Ad Slots
A successfully rendered ad will append additional DOM elements to the passed ad container. These
will be stretched to the exact size of the ad, so please take care that your ad container is expandable by its children
(avoid overflow: hidden
, height:0
, display:none
etc).
If you need a height:0
i. e. to initialize a slideDown animation, you can start with height:auto
, attach a callback
to the insertAd
call and listen to the insertable
call. At that time you can apply any rules like height:0
without
interfering with the integrated viewability check.
Please avoid any CSS rules for children of the ad container. Somtag will take care of this.
If no ad could be delivered, Somtag will collapse any content of the ad container and will apply
the class class="somtag--collapsed"
to the ad container.