Archived topic
Images appearing very large on certain posts on mobile
33 replies · Started by Devin on February 24, 2022
I'm finding that certain posts on mobile only are appearing very large when clicking through to the page. This is not consistent through each post, only the few that I've clicked on. Thankfully, I'm not having this issue with either desktop or tablet. I left the posts that I found to be having this issue and came back to make sure my phone wasn't accidentally zoomed in and was still experiencing it. I've attached a screenshot below.
Hi Devin,
Any chance you can link us to the post in question?
You can use the private information field.
https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Let me know :)
Of course :) I'm sure there are more but these are just a few that I've found just by clicking through a couple of them.
It's because of this CSS:
https://www.screencast.com/t/yzqvOVFjKkj
body {
display: flex;
flex-direction: column;
}
What were you trying to achieve with this CSS?
Honestly, I've been adding so much code that I'm not sure. But when I remove it, I lose the radius of my search bar on desktop.
I lose the radius of my search bar on desktop.
Try delete the whole CSS under media query @media (max-width: 768px):
https://www.screencast.com/t/oiMbu0mL
Okay, I'm just now remembering that that CSS was for my mobile header. I wasn't able to get my Page Hero under my header despite trying many different related hooks so I had to add that code in.
Is the element type set to page hero?
https://docs.generatepress.com/article/block-element-page-hero/
Yes, and the priority is 1 considering I have WPSP right below that. Very confusing.
1 is a very high priority so the page hero goes on top of the mobile header.
The theme elements are hooked in with 10 as priority, you might want to leave the page hero priority blank.
When I leave it blank it drops below the Featured Articles section. I tried setting it as 2 and taking the code out to see if maybe it would prioritize the header as 1 but still, the header dropped below the page hero.
What's the priority and hook name set for the featured article section?
The priority for the featured articles is blank. What's confusing is that it's showing correctly for tablet and desktop, but not mobile.
Can you set hook name of the featured article to insdie_site_container?
That made it disappear completely. I tried it with a priority of 1 and blank but nothing. It also changed the location of the pager hero on desktop and tablet.