[Support request] Disable cover on mobile

Home Forums Support [Support request] Disable cover on mobile

Home Forums Support Disable cover on mobile

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1153396
    Edwin

    Hi

    What is the best way to disable Cover for Page hero on the mobile

    The below is working, but is not correct CSS

    .page-hero {
    background-size:none!important;

    }

    Thanks

    Edwin

    #1153430
    Leo
    Staff
    Customer Support

    Hi there,

    Can you explain a bit more? What do you mean by disabling Cover for page hero?

    Like removing the background image on mobile?

    A link to your site might also help.

    Let me know 🙂

    #1153438
    Edwin

    Hi Leo

    I would like to show to picture normal in full width and height. Not cover size on mobile

    #1153444
    Leo
    Staff
    Customer Support

    Hmm background images don’t quite work like this.

    background-size: none isn’t actually a valid property:
    https://www.w3schools.com/cssref/css3_pr_background-size.asp

    Can you try modifying the padding with mobile toggle activated to see if you are able to achieve the desired result?
    https://docs.generatepress.com/article/how-to-create-a-page-hero/#step-4-set-the-height

    We can also use an image specifically for mobile if you’d like?

    #1153453
    Edwin

    Hi Leo
    Hmm background images don’t quite work like this.

    Yes, i am looking for another way. Unfortunately, i have many headers in the website and only that seems to work. Padding will now work, it will not show the whole picture.

    #1153481
    Leo
    Staff
    Customer Support

    Every case is a bit different as it really depends on the picture itself.

    One thing for sure is that background-size: none; isn’t fixing anything as it’s an invalid command.

    Can you try adding that image as the featured image of that page and make it displayed in the header element?

    Then we can try hiding the page hero on mobile and just use the featured image instead.

    Let me know 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.