[Resolved] entry-title padding: different effect in desktop and mobile

Home Forums Support entry-title padding: different effect in desktop and mobile

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #952138
    Mike

    In Tasty theme, I’m using .entry-title top and bottom padding to adjust the spacing. I also have a text section using before_main_content hook.

    The problem is, spacing appears quite different when viewed in mobile (same in different mobile browser) and on laptop. When it looks right in laptop, too much spacing in mobile, when looks good in mobile, too tight in laptop.

    Thanks!

    #952151
    Leo
    Staff
    Customer Support

    Hi there,

    I just checked the site and the entire entry-header element is hidden currently.

    Can you unhide it so I can check the issue?

    Let me know if I’m missing something 🙂

    #952265
    Mike

    I’m using navigation as header.

    If you look at any of the pages (any of the nav menu links) and compare the spacing above and below the page title, to the same viewed on a smartphone (I’m using a Samsung G8), the space above and below the page title is much greater than in the desktop view.

    I want a tighter mobile view, less padding above and below the page title. But when I get what I want with .entry-title padding, the desktop view is too closely spaced.

    I’ve tried different browsers on laptop and mobile and the spacing is the same in all of them.

    #952269
    Leo
    Staff
    Customer Support

    I believe you have this CSS added?

    .entry-title {
        padding: 10px 0 20px;
    }

    Can’t quite tell as you have Autoptimize on.

    You can also have specific CSS for mobile as well:

    @media (max-width: 768px) {
        .entry-title {
            padding: 20px 0 20px;
        }
    }

    https://docs.generatepress.com/article/responsive-display/

    Let me know if this helps 🙂

    #952511
    Mike

    Yeah, that’s what I needed. And I switched to margin.

    Thanks!

    #952530
    Leo
    Staff
    Customer Support
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.