Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

CLS Issue: CSS Being Overridden

$
0
0

Replies: 0

I am assuming that you are already aware of the Core Web Vitals which is going to be in effect from this month.

So, while optimizing my ads to NOT jump to avoid the CLS (Cumulative Layout Shift) issue, I was setting the “height” using the CSS. But it seems like something is replacing the value when the ads are loaded. Even when I use the “!important” after the CSS height, it still gets replaced. The “min-height” is also not working.

Height and Min-height values are being replaced with “height: auto !important” and “min-height: auto !important” with the inline CSS styles after the page load.

Note: The “!important” is only being added in the mobile version. On desktop, the inline styles can be overridden using CSS because the “!important” is not being added.

So, I want to know if it is done by this plugin. And if so, how can I prevent it and set CSS height for the ad container which will not be replaced.


Viewing all articles
Browse latest Browse all 59525

Trending Articles