Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #918634

    Hello, I’ve added sticky mobile header to both of my websites (https://longislandinterventions.com and https://longislandintervention.com) using the following CSS:

    @media only screen and (max-width: 767px) {
    .responsive #top #wrap_all #header {
    position: fixed;
    }
    }

    @media only screen and (max-width: 767px) {
    .responsive #top #main {
    padding-top: 100px !important;
    }
    }

    However both websites now have a varying degree of white space between where the header ends and content begins (see attached screenshots) How can i get rid of this white space, please? I’ve tried to make the “padding-top” CSS a smaller number (such as 80px) but it doesn’t help.

    View post on imgur.com

    View post on imgur.com

    • This topic was modified 6 years, 10 months ago by zohar2014.
    #919070

    Hey zohar2014,

    I see the problem seems to be caused by the sticky header, having the fixed position, can you try to add this css code also:

    @media only screen and (max-width:479px) {
      .responsive #top #main {
        padding-top: 82px !important;
      }
    }

    Checked this with emulators and seems to work fine, let us know if this helps. :)

    Best regards,
    Nikko

    #919181

    Thank you! this fixed the issue, but there is one more issue:

    The white space shows on all “sideways” horizontal smartphone views, is there a way to fix that please? Along with making the header widget a responsize size in sideways smartphone view. In all of my testing of sideways display the white space is still there and the header widget is overlapping the header. Thank you.

    View post on imgur.com

    #919366

    Hi,

    You’re welcome, in your Quick CSS you should find this media query:

    @media only screen and (max-width:767px) {

    below it, add this css code:

    #header #media_image-3 {
        top: 0;
    }
    
    #header #media_image-3 img {
        max-height: 70px;
        width: auto;
    }

    Let us know if this helps :)

    Best regards,
    Nikko

    #919585

    Thank you! this has fixed the header widget responsiveness/size in sideways mobile view. However, in all sideways view this white space is still there, is there any way to get rid of it?

    View post on imgur.com

    #919633

    Hi,

    I have modified your css code, and have replaced this code:

    @media only screen and (max-width: 767px) {
      .responsive #top #main {
        padding-top: 100px !important;
      }
    }
    
    @media only screen and (max-width: 479px) {
      .responsive #top #main {
        padding-top: 82px !important;
      }
    }

    to:

    
    @media only screen and (max-width: 767px) {
      .responsive #top #main {
        padding-top: 82px !important;
      }
    }

    Hope it’s all good. :)

    Best regards,
    Nikko

    #919693

    Perfect!!! Nikko is the BEST!!! He needs a RAISE!!!

    #920131

    Hi,

    LOL XD Thanks for the compliment, and it’s a pleasure to help you :) Thanks for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Need Help With Sticky Mobile Header’ is closed to new replies.