Skip to content

Fixed nav & header #2

Open
Open

Description

@jamesl1001

Fix the <header> so that the .content-wrapper slides on top of the <header> when the user scrolls.
Fix the <nav> so it always remains at the top of the page.

Activity

  1. jamesl1001 commented on Jul 27, 2013

    @jamesl1001
    MemberAuthor
    nav {
      width: 100%;
      position: fixed;
      top: 0;
      z-index: 3;
    }
    
    header {
      height: 300px; // fixed height required
      padding: 0 3%; // includes top/bottom padding
      position: fixed;
      top: 45px;
      z-index: 1;
    }
    
    .content-wrapper {
      background: #FFF;
      margin-top: 300px;
      position: relative;
      z-index: 2;
    }
  2. JacobH1992 commented on Jul 27, 2013

    @JacobH1992
    Member

    Cool, got a demonstration?

  3. jamesl1001 commented on Jul 28, 2013

    @jamesl1001
    MemberAuthor

    Not yet. Let's get #1 done first.
    There's also complications with the homepage because that header is larger than the other pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions