- This topic has 7 replies, 2 voices, and was last updated 3 years, 11 months ago by
David.
-
AuthorPosts
-
April 20, 2019 at 12:14 am #874000
Deep
Hi,
I would like to know how to contain the entire featured image within the header element hero section. At the moment it is entirely spread over the header element.
You can see the screenshot here http://prntscr.com/neh1idI want it on the right hand side of the header element. Please help.
GeneratePress 2.2.2GP Premium 1.7.8April 20, 2019 at 7:43 am #874309David
StaffCustomer SupportHi there,
so you would effectively want two columns? One with the Title etc on the left and the image on the right?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 20, 2019 at 9:10 am #874378Deep
Thanks for your reply.
I want to achieve the following designs:
for desktop version
http://prntscr.com/nely84for mobile version
http://prntscr.com/nelymnWell, it is certainly achievable as per your recommendation but the mobile version may behave differently from that of the design ideas.
So, placing the featured image as a background image would have design accuracy in this regard.
Anyway, let me know what your suggestion is? You are certainly in a better position to advise me.April 20, 2019 at 9:30 am #874397David
StaffCustomer SupportCan you share a link to the site with that header element set up like you had in your original post?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 20, 2019 at 10:15 am #874421Deep
Actually, I am working on localhost. So, please bear with me. Please let me know what information you required in this regard.
April 20, 2019 at 12:21 pm #874483David
StaffCustomer SupportIt we be good to be able to see the Site so i can provide the exact CSS but you try:
1. In the Header Element set the background position to Right Center.
2. Add this CSS:.page-hero { background-size: 50%; }
Reduce or increase the % to resize the image.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 20, 2019 at 1:20 pm #874509Deep
Hi,
Thanks for your support. I have achieved it by.page-hero {
background-size: contain;
}Now please let me know how to disable the background image in mobile version only.
April 20, 2019 at 1:50 pm #874547David
StaffCustomer SupportTry this CSS:
@media (max-width: 414px) { .page-hero { background-image: none !important; } }
Please note that this will apply to all Header Elements. If you wish to apply it to only that specific Element then in the Header Element you can add a class name to the Element Classes field e.g
custom-hero
then replace the.page-hero
in your CSS with.custom-hero
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.