- This topic has 33 replies, 4 voices, and was last updated 4 years, 11 months ago by
David.
-
AuthorPosts
-
April 13, 2021 at 5:31 am #1732385
David
StaffCustomer SupportHamburger Icon – is the 3 bar menu toggle 🙂
Try adding this CSS so it has a min height enabled on small screens – it should stop the major CLS contribution:
@media (max-width: 531px) { #mobile-header { min-height: 154px; } .site-logo.mobile-header-logo { min-height: 93px; width: 100%; } }April 13, 2021 at 7:57 am #1732832metcomllc@aol.com
This is my current CSS. Please tell me where to put it.
#mobile-header img { width: 100%; height: auto; } h1.entry-title { display: none; } @media (max-width: 768px) { .page-hero { background-image: url(https://www.tryhypnosisnow.com/wp-content/uploads/2020/04/Hypnosis-NYC-for-quit-smoking-weight-loss-anxiety-phobias-confidence.jpeg); } } @media (min-width: 769px) { .main-navigation li.search-item { display: none !important; } } #mobile-header .inside-navigation { display: flex; flex-wrap: wrap; justify-content: space-between; } .main-navigation .mobile-bar-items { order: 4; } input.ticket-selector-submit-btn { background-color: #001de0!important; color: #fffff; } @media(max-width: 1024px) { .page-hero { display: none; } }April 13, 2021 at 4:54 pm #1733305David
StaffCustomer SupportYou can add it at the very end of the CSS – just add a new line after the last
}April 13, 2021 at 5:03 pm #1733312metcomllc@aol.com
But will it conflict with my current CSS?
April 13, 2021 at 5:58 pm #1733336metcomllc@aol.com
I added the CSS but was concerned about a conflict with my current CSS?
I cannot tell myself. Has the logo issue/reflow issue been resolved?
April 13, 2021 at 10:27 pm #1733456Elvin
StaffCustomer SupportHi there,
It shouldn’t conflict as the CSS has its own media rule on a specified viewport different from your other CSS.
I’ve ran the site on Google PSI and while there’s still CLS being flagged. It’s really low to be a cause of concern.
For mobile – Cumulative Layout Shift 0.056
For Desktop – Cumulative Layout Shift 0.001These values are way below
0.1which is good.April 14, 2021 at 3:39 am #1733697metcomllc@aol.com
Has the “reflow” issue been resolved? I ask because it impacts all of my pages.
April 14, 2021 at 7:50 am #1734254David
StaffCustomer SupportI made a change to the CSS here:
https://generatepress.com/forums/topic/cls-and-grid-container-issue/page/2/#post-1732385
Update your CSS to that – this should stop the menu icon and search moving down when the image loads.
April 14, 2021 at 8:04 am #1734271metcomllc@aol.com
I made the change. Please check the reflow issue.
April 14, 2021 at 9:49 am #1734398David
StaffCustomer SupportAah just spotted the Image you have at the top of the page – the HTML contains the incorrect width and height attributes. Can you edit the img html – the width should be 382 and the height should be 276.
April 14, 2021 at 11:41 am #1734500metcomllc@aol.com
So I made the change but I am wondering why I had the wrong image dimensions as I used the dimensions listed in the WP image block settings. For example, are the dimensions on this page correct https://www.tryhypnosisnow.com/stop-smoking-hypnosis-nyc/? I just want to make sure this is not a site wide issue (wrong image dimensions).
April 15, 2021 at 1:16 am #1734981David
StaffCustomer SupportThat image is correct. Can’t say why that other image had incorrect attributes.
April 15, 2021 at 4:00 am #1735145metcomllc@aol.com
Has the reflow issue been addressed?
April 15, 2021 at 5:30 am #1735247David
StaffCustomer SupportYou can see on the PSI report that the reflow has been fixed ie the CLS is
0And one final fix – i noticed some of your left-aligned images don’t work too well on smaller devices. Add this CSS to make sure they fill the width of the screen:
@media(max-width: 500px) { .wp-block-image .alignleft, .wp-block-image .alignleft img { float: none; width: 100% } }you can add this at the end of your Customizer > Additional CSS.
Thats everything done then.
April 15, 2021 at 5:53 am #1735271metcomllc@aol.com
Thanks David.
Any suggestions for these unique pages, one with many videos
-
AuthorPosts
- You must be logged in to reply to this topic.