- This topic has 10 replies, 2 voices, and was last updated 2 years, 11 months ago by
David.
-
AuthorPosts
-
April 6, 2023 at 2:45 am #2599173
Joken
Hello @diggeddy,
My website has three columns left sidebar content and a right sidebar. When I run my website https://itsourcecode.com/ in Google pagespeed i got problems in CLS, specifically the
the left and right. Please help me how to solve this issue.April 6, 2023 at 5:36 am #2599375Joken
When I run it in google page speed, I got this CLS issue
<div class="content-area"> <div class="widget-area sidebar is-left-sidebar"> <div class="widget-area sidebar is-right-sidebar">can you please help me how to fix this issue? what would be the CSS code to implement to solve this problem?
April 6, 2023 at 6:11 am #2599428David
StaffCustomer SupportHi there,
tricky one, as you have custom sidebar widths, and i am not sure if it is that CSS that is causing the issue or some deferred loading of the HTML causing it.
If its the latter, you can try adding this CSS:@media(min-width: 768px) { #primary { margin-left: auto; margin-right: auto; } }But i am not sure if that will help.
Let us know.
April 6, 2023 at 6:17 am #2599443Joken
Hi, thanks for your reply. Yeah, I agree that this is a tricky one. I have here some CSS code maybe you might have any idea on to fix this one.
.right-sidebar .site-content { justify-content: flex-start; } .both-sidebars .site-content { justify-content: center; } .left-sidebar .site-content, .both-left .site-content { justify-content: flex-end; } .site-content .content-area { width: calc(100% - 600px); } .is-left-sidebar { width: 20%; } .is-right-sidebar { width: 20%; }April 6, 2023 at 6:20 am #2599449Joken
Also, I do not have a problem with the mobile device because in most of my testing, I got 0 score in CLS.
April 6, 2023 at 6:35 am #2599466Joken
BTW, I have tried your code but it doesn’t work as expected.
April 6, 2023 at 7:26 am #2599523David
StaffCustomer SupportDoes the CLS persist if you remove all your custom CSS?
need to ascertain whether its a CSS issue or a CSS / HTML loading issue.April 6, 2023 at 5:59 pm #2600309Joken
Hi, I tried to remove all the additional CSS to test the site. But sad to say, I still got the same CLS issues.
April 8, 2023 at 2:10 am #2601846David
StaffCustomer SupportHmmm… we may have to try some hit and miss CSS options:
.site-content .content-area { margin-left: auto; margin-right: auto; }April 8, 2023 at 6:00 am #2602010Joken
I will try this code if my testing wasn’t successful for the meantime I run several tests and troubleshoot if these issues are caused by some caching plugins or anything. I will update you soon. thanks
April 10, 2023 at 2:53 am #2603781David
StaffCustomer SupportKeep us posted!
-
AuthorPosts
- You must be logged in to reply to this topic.