" /> " /> "/>

How to eliminate "Avoid Large Layout Shifts" for the below code?

43 views Asked by At

In lighthouse it shows avoid large layout shift for the following element:

<div id="HomeNewsEventsWrapper" class="section fixedheight1 introduction">

It shows avoid large layout shift even after setting width and height

<div id="HomeNewsEventsWrapper" class="section fixedheight1 introduction" style="width:375px;height:639px;">

How to fix the issue?

1

There are 1 answers

0
Barry Pollard On

A shifted element is often the victim of another element above it being inserted or changing size. So you need to figure out why this element shifted and fix that element from causing the shift to this element.

We’re looking at ways to report the probable cause more in Lighthouse but for now we just list the element shifted (as that’s how CLS is measured).