[Resolved] Featured Image On Mobile Portrait View

Home Forums Support [Resolved] Featured Image On Mobile Portrait View

Home Forums Support Featured Image On Mobile Portrait View

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1179200
    Rafael

    Tech,

    I added a Featured Image to all my pages (except front page) via the Header Elements ( Page Hero ).

    It is working. Except I need a tweak to resize the featured image on mobile portrait mode. Its too big, gets cut off and not displaying fully.

    Please check on your mobile phone. I am using an iPhone if it matters.

    #1179244
    Leo
    Staff
    Customer Support

    Hi there,

    Can you try changing the top and bottom padding with mobile toggle activated?
    https://docs.generatepress.com/article/header-element-overview/#padding

    The size of the image is determined by the padding:
    https://docs.generatepress.com/article/how-to-create-a-page-hero/#step-4-set-the-height

    #1185233
    Rafael

    Tech,

    I set the mobile featured image padding which makes the featured image hero image look better.

    The setting is adding top bottom padding with max-width of tablet size

    @media (max-width: 768px)
    .page-hero {
        padding-top: 75px;
        padding-bottom: 75px;
    }

    How do I add an additional media query for 480px for mobile?

    My code is not working

    /*Mobile Device*/
    @media only screen and (max-device-width: 480px) {
    .page-hero {
        padding-top: 50px;
        padding-bottom: 50px;
    }

    Thanks

    #1185246
    Rafael

    this works:

    
    /*Featured Image Mobile View (Hero)*/
    @media (max-width: 425px) {
        .page-hero {
        padding-top: 50px;
        padding-bottom: 50px;
        }
    }
    
    #1185402
    Leo
    Staff
    Customer Support

    Glad you’ve figured out 🙂

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