[Support request] Remove space between header and content area

Home Forums Support [Support request] Remove space between header and content area

Home Forums Support Remove space between header and content area

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #2297601
    Tim

    I would like to remove the space between the header and content area (grey background color).

    I tried using css code provided on another support request, but it had no effect on the size of margin between header and content.

    .entry-content {
    margin-top: 0 !important;
    }
    
    .page-header, .sidebar .widget, .site-main>* {
    margin-bottom: 0 !important;
    }

    Here is a link to my site:
    https://www.nesteaglerock.com

    Also, what would I add to the css to make it only on mobile.

    Thank you!

    #2297611
    Ying
    Staff
    Customer Support

    Hi Tim,

    Can you go to customizer > layout > container, and chooseone container as the content layout?

    Let me know if that’s what you want ๐Ÿ™‚

    #2297664
    Tim

    Almost. I would like it to only be on mobile, but I also want a 1 pixel divider line. So, I was thinking if I set the margin between the containers to 1px on mobile only, this would do it. What do you suggest?

    #2297667
    Tim

    Okay, so I changed back to separate containers and choose 1px for my space, and it’s perfect. How do I make it on mobile only?

    #2297732
    Ying
    Staff
    Customer Support

    Try this CSS:

    @media (min-width: 769px) {   
        .separate-containers .site-main {
            margin-top: 0;
        }
    }
    #2297741
    Tim

    Hi Ying,

    It didn’t work.

    #2297945
    David
    Staff
    Customer Support

    Hi there,

    your current CSS looks like this:

    @media (min-width: 769px) {
        .separate-containers .site-main {
            margin-top: 1 !important;
        }
    }

    the margin-top value of 1 requires the units eg. 1px.

    So change your CSS to this:

    @media (min-width: 769px) {
        .separate-containers .site-main {
            margin-top: 1px !important;
        }
    }

    The only time you can omit the Units is when the value is 0

    #2298021
    Tim

    I wanted it to only affect mobile so I changed it to max-width: 768px and it worked like a charm! Thanks, again! Your support team and product are amazing!

    #2298027
    David
    Staff
    Customer Support

    Aah yes ๐Ÿ™‚ Glad to hear its working !

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