• Resolved sorenblixt

    (@sorenblixt)


    How can I reduce the space between nav menu and text area ONLY for mobile site using custom css? So that the text area will appear just under the nav menu…?
    I have decreased the same space on desktop site, and that works perfectly.

    The site I need help with is https://www.tradenmark.com. (mobile site)

Viewing 9 replies - 1 through 9 (of 9 total)
  • AddWeb Solution

    (@addweb-solution-pvt-ltd)

    Hello sorenblixt,

    Add below css into your current theme’s style.css file (at the end) locatec at wp-content/themes/your_current_theme/ folder.


    @media ( max-width:480px ) {
    div.site-content {
    margin-top: -20px;
    }
    }

    Note : All Changes you done in any file of theme are gone when you update theme. So prefer Child Theme.

    Hope this will helps you.

    Thread Starter sorenblixt

    (@sorenblixt)

    Thanks a lot – I tried adding it into custom css under appearance / customize, and it worked in there, but not when I try to enter the actual mobile site from my mobile.

    Will try the style.css – but not exactly sure what this means
    Note : All Changes you done in any file of theme are gone when you update theme.

    Thread Starter sorenblixt

    (@sorenblixt)

    It actually works on mobile page https://www.tradenmark.com/services – but not on the other pages?

    Thread Starter sorenblixt

    (@sorenblixt)

    I can see that my background image changes on my various mobile site pages – the pages: services and offers – work perfectly with the code you provided, but not the other pages.
    On the pages where the code do not work, the background changes slightly…?

    AddWeb Solution

    (@addweb-solution-pvt-ltd)

    Hello sorenblixt,

    Note : All Changes you done in any file of theme are gone when you update theme. line means that if you direct changes in theme file it will removed when you update theme so you have to create a child theme for it and add your changes into it.

    Try below css:

    @media only screen and ( max-width:600px ) {
     .site-content {
       margin-top: -20px !important;
     }
    }

    Hope this will helps you.

    Thread Starter sorenblixt

    (@sorenblixt)

    OK, is it not possible to insert css under appearance / customize? and avoid creating child theme?

    It′s working on some of my mobile pages….

    AddWeb Solution

    (@addweb-solution-pvt-ltd)

    If there Additional CSS option in theme customize (Dashboard >> Apperance >> Customize) then you can add that css into textarea for additioanl css.(Avoid creating child theme)

    Thread Starter sorenblixt

    (@sorenblixt)

    Super, thanks – that is what I have done, and it works, but only on 2 of my mobile pages

    Is there anything I can do about that? Can it have something to do with my background image, that changes slightly from page to page (for some reason)

    Thread Starter sorenblixt

    (@sorenblixt)

    It now works on all pages – thanks a lot!!!!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Reduce the space between nav menu and text area ONLY for mobile site’ is closed to new replies.