- This topic has 13 replies, 6 voices, and was last updated 4 years, 2 months ago by Leo.
-
AuthorPosts
-
July 12, 2016 at 8:01 pm #208980Jono
Hi Tom,
I’m having a lot of trouble trying to tweak the dimensions of Page Header images so they look good across a variety of screen sizes.
These are long and narrow images to be displayed 400px high. When the images have a definite focal point it’s really hard to get it looking good on both desktop and mobile, without something getting severely cropped.
Any thoughts on good all-rounder dimensions or aspect ratios?
Thanks!
– Jono
July 13, 2016 at 12:33 am #209045TomLead DeveloperLead DeveloperHi Jono,
Images can be tough when it comes to being responsive.
Are these static images or background images? Static images are much better at being responsive.
July 14, 2016 at 8:26 pm #209848JonoHey Tom, thanks for the reply. I’m sorry, I should have given more detail and an example link. My apologies.
These are background images using the Page Header plugin. Here’s an example: http://karmalawyers.com/who-we-are/.
Same issue on the Home page with background images in Sections.
I was just finding it tricky locating a “sweet spot” for dimensions so that the images would look good at different screen sizes. The images are naturally being displayed with very different ratios on desktop vs mobile screen sizes.
On desktop they look very short and wide, so only a sliver is shown, which may be just the tops of people’s heads. But on mobile the images are almost square, and in the case of Sections on the Home page you might only see the left part of the image.
If you have any tips on how to handle this more gracefully, it would be appreciated!
Thanks.
– Jono
July 14, 2016 at 11:36 pm #209885TomLead DeveloperLead DeveloperYou can apply a different image to the background specifically meant for mobile using the Simple CSS plugin: https://wordpress.org/plugins/simple-css/
Use the Simple CSS metabox on each individual page, and do something like this:
@media (max-width: 768px) { .generate-content-header { background: url( 'URL TO MOBILE IMAGE' ); } }
Let me know if that works or not π
July 15, 2016 at 10:36 pm #210207JonoTom, thanks so much. At this stage I probably won’t go ahead with that, but now I know how to get a better result if time permits!
– Jono
July 16, 2016 at 12:44 am #210240TomLead DeveloperLead DeveloperGlad I could help π
July 31, 2016 at 5:07 am #214264ChristineI am having the same issue. I created a new image that is square in the hopes of adding it as a mobile header only. I also added simple-css and entered the coding you mentioned on each page and also on the simple css editor on my dashboard. What do you think? What am I doing wrong?
July 31, 2016 at 1:57 pm #214371TomLead DeveloperLead DeveloperHi there,
Can you link me to a page where it’s not working?
July 31, 2016 at 3:02 pm #214386ChristineHere is the temporary domain:
http://s209994800.onlinehome.us/
This link will only work for my site until tomorrow around noon.
July 31, 2016 at 9:12 pm #214414TomLead DeveloperLead DeveloperHi Christine,
So it looks like you’re using a background image as your header on desktop, then you’re using the mobile header feature. That feature is best when it comes to a simple logo, not so much a full header.
What if you added your header as the logo instead of a background image (Customize > Site Identity).
Then disable the mobile header completely.
Let me know π
August 1, 2016 at 5:25 am #214477ChristineI see what you are saying. However, is there any way to use to logo header feature and have it only appear on mobile devices? I made a sort of mini header image to go there. My client is wanting that full image header for the main site still.
August 1, 2016 at 10:23 am #214541TomLead DeveloperLead DeveloperThis might help: https://generatepress.com/forums/topic/mobile-header-2/#post-171391
February 3, 2020 at 2:56 pm #1153419MilosI am having the same issue as Christine. I also created a new image that is square in the hopes of adding it as a mobile header only. I also added simple-css and entered the coding you mentioned on each page and also on the simple css editor on my Customizer. The only background image which I can see even in mobile view is the bigger desktop image.. (which I am using with the Page- (Site) Header Elements). Could you help me please?
February 3, 2020 at 3:29 pm #1153433LeoStaffCustomer SupportThis topic is super old and the page header module has already been replaced with the header element.
Can you please open a new topic and link us to the page in question?
Thanks π
-
AuthorPosts
- You must be logged in to reply to this topic.