Hi Alexander,
thanks for your response!
No problem, the point with Cumulative Layout Shift is that the content doesn’t shift too much when the web page loads. This can be avoided with placeholders for ad-banners or – in this case – the carousel. Here you can find more information about CLS.
Thanks for the code, but unfortunately this doesn’t work. I’ve already implemented the second code you posted before, but that doesn’t “reserve” the space at the init page load for the carousel which loads afterwards.
The first snippet makes the carousel twice as big as before, so this doesn’t work too.
I hope that I could point you in the right direction. The important thing is that it has to be a “fix” which works without JavaScript, as this gets loaded some seconds later.
You can “watch” the CLS using Chrome -> F12 -> Lighthouse -> Desktop -> Generate Report -> after that is done, scroll down and click “View Original Trace”.