-1

As an example, this page (https://www.aaoc.com.au/rent-hire-av-trolleys) has a CLS of 0.934 on Desktop which results from the javascript dropdown sub-menus. How do I minimise or eliminate this CLS on desktop as its the only Page Speed metric which is an issue for this site???

We have tried inline style to hide the menu elements & added height & width to the base element, but it makes no difference to the CLS.

1 Answers1

-1

The problem is that your menu HTML for some users initially shows before being turned into a formatted menu. And for a fraction of a second, it shows a long list of text.

I'd guess some loaded CSS or JavaScript turns it into the menu.

You want to make it look reasonably close to being a menu before any CSS or JavaScript is loaded.

Maybe some inline CSS to ensure it looks ok before the menu is constructed.

Tony McCreath
  • 2,882
  • 1
  • 14
  • 21