Archived topic
How to add Large Ad format without affecting CLS
5 replies · Started by Peter Paul on September 8, 2020
Hi GP Team,
I am planning to put a 970x250 large ad format on my site.
It would be located just below the header, above the main content or main body.
How can I put that ad without affecting the CLS?
What do you think is the best method for this?
I tried to put a 160x600 or 300x600 skyscraper ad on the side bar, but it seems to affect CLS.
Right now I haven't installed any ads yet.
Thank you!
Hi there,
you would have to place the advert within a container that you can set a minimum height to.
eg. this HTML
<div class="header-advert">
<!-- you ad script here -->
</div>
this CSS:
.header-advert {
min-height: 250px;
}
Hi David,
I was able to ad the large advert using Hook. Thank you!
You can check it from some of the pages here:
https://thepcenthusiast.com/msi-geforce-rtx-3090-rtx-3080-and-rtx-3070-gaming-x-trio-and-ventus-lineup-released/
https://thepcenthusiast.com/evga-geforce-rtx-30-series-graphics-cards-released/
However, notice that there seem to be a noticeable gap between the bottom of the Advert banner and the breadcrumbs / side bar.
How can I minimize it? I can't find which element or value to change.
Thanks,
You can reduce the Bottom padding in Customizer > Layout > Header
Thank you very much! That solves it! :)
Glad to be of help