- This topic has 9 replies, 2 voices, and was last updated 2 years, 1 month ago by RodeBoy.
-
AuthorPosts
-
February 18, 2022 at 1:50 am #300033RodeBoyParticipant
I am working on http://www.emmaelizabethspmu.co.uk for a client. The Header Media displays fine on a desktop and in landscape mode on my mobile, but as you can see does not in portrait on a mobile. What is the best way around this please? Is it possible to have an alternative image display JUST in portrait mode on a mobile? If so, could you advise the CSS coding please? Thanks, Chris
February 18, 2022 at 4:57 am #300050SkandhaParticipant@rodeboy: Hello there,
Go to => Appearance => Customize => Additional CSS and add the following CSS Code.
.custom-header { background-image: unset !important; } .custom-header .custom-header-media img { display: block !important; object-fit: unset !important; } .custom-header, .has-section-background-image { z-index: 0; }
Let me know if this works out!
Kind Regards,
SkandhaFebruary 18, 2022 at 5:27 am #300057RodeBoyParticipantThanks Skandha. This certainly does the job, but as you can see re-shapes my clients logo. I can fully understand the issue, particularly when there is writing involved. Obviously when there is an image it can work nicely with suitable designing. I will speak to my client to see what she wants, and try to encourage an image as the header media.
Is there not an option to style it like the Rock Star Pro theme where the slider/header image just goes to the top (on mobiles in portrait) and you lose the full screen look – does that make sense?!
Chris
February 18, 2022 at 6:16 am #300063RodeBoyParticipantI have just noticed that the coding messes up the headers on the posts pages .. so unfortunately it doesn’t work! No doubt you will advise further Skandha.
Thanks, Chris
February 18, 2022 at 11:46 pm #300102SkandhaParticipant@rodeboy: Hello there,
Can you please add the following Code instead?
.custom-header { background-image: unset !important; } .custom-header .custom-header-media img { display: block !important; object-fit: unset !important; } .custom-header { z-index: 0 !important; }
Let me know if this works out!
Kind Regards,
SkandhaFebruary 20, 2022 at 7:40 am #300150RodeBoyParticipantHi Skandha, whilst that coding works on the home page when you then go to a post the header on there is full width squeezed into the width of the screen. Is my suggestion of styling it like the Rock Star Pro theme header not an option?
Thanks, Chris
February 21, 2022 at 3:55 pm #300241RodeBoyParticipantAny further thoughts on this Skandha please, as my client is pushing to get this sorted? Thanks
February 25, 2022 at 6:04 pm #300563RodeBoyParticipantCan I please have a response as soon as possible? Thanks
February 26, 2022 at 10:03 am #300604SkandhaParticipant@rodeboy: Hello Chris,
Sorry for the late reply. To have the header image on posts display like in the Rock Star theme you will need to upload images of around 1920*600px which has full width but relatively smaller height. Here as the image used in the posts is 1000x750px it will cover a lot of height and you will need to scroll to view the content of your posts. Doing this will change the featured image size on the archive page as well.
Let me know what you would like to do.
Kind Regards,
SkandhaFebruary 26, 2022 at 6:42 pm #300618RodeBoyParticipantThanks Skandha, I think that the answer is for my client to find a suitable image that works with the Header Media element of this theme.
Thanks for your time.
-
AuthorPosts
- The topic ‘Different Header Media for mobiles in portrait mode’ is closed to new replies.