How we could avoid Cumulative Layout Shift?
I have a carousel in my web page. I am getting bad CLS score because elements on the carousel is changing size over page load.
You should calculate the height of the carousel wrapper element and reserve it before the carousel is loaded to avoid any layout shift. One way is to know your images aspect ratio and calculate the height from width.
How we could avoid Cumulative Layout Shift? I have a carousel in my web page. I am getting bad CLS score because elements on the carousel is changing size over page load.
I am using this settings