CLS Issue with adsense responsive ads

How to solve CLS issue caused by adsense responsive ads? I am using manual ad code above the fold with min-height but still the CLS issue persists and reported on GSC.

1 Like

I don’t know anything about the ad code but if you are reserving the space with a fixed height and width element then that should avoid the CLS issue. (Note percentage height values are unlikely to work here.)

There seems to be some similar answers here.

If the ads are responsive in height and width then you’d probably need to set the aspect ratio of a containing div to match the aspect ratio of the ad.

Thanks for your reply. Could you please check the url https://www.dyarakotiuk.com for the ad code placed on above the fold and how to set aspect ratio?

I don’t see any ad appearing at all?

Sometimes the ads are not appearing.

The advert height is 280px but you are setting a min-height of 310px which gets overwritten to zero when the ad loads. That gives a layout shift of 30px.

Try using a min-height of 280px to start with in your inline code.