WordPress.org

Ready to get started?Download WordPress

Forums

Pinboard
[resolved] Making header Fixed (5 posts)

  1. paul.a.cunn
    Member
    Posted 1 year ago #

    Hi everyone,

    So on my site I would like the header to be static and stay at the top of the browser window. I have done this with the footer but the header is more difficult. I have used the "position: fixed;" and then shifted the #wrapper down to account for the header but different broswers are adding or taking away space so the slider is sometimes too far down or being overlapped by the header. Here is a link to my site. I currently have the header scrolling. I want it to act like the footer.

    http://www.natalieturgeonband.com/

    Thanks for the help!

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    What if you reapply your position fixed and apply some z-index to get it on-top, and then add some top values to your content?
    E.g;

    #slider {
     top: 200px;
    }
  3. paul.a.cunn
    Member
    Posted 1 year ago #

    I have added the following css to my custom css looks good.

    #header {
    position: fixed;
    width: 1140px;
    z-index: 9;
    }

    #slider {
    position: relative;
    top: 187px;
    }

    #container {
    position: relative;
    top: 187px;
    }

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    :) And I must say, Thank you for your contributions to the WordPress community.

  5. paul.a.cunn
    Member
    Posted 1 year ago #

    Thanks just paying it forward for all the help I have received.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.