Grow your CSS skills. Land your dream job.

Fixed Menu: Moving the Content Down

  • # May 20, 2013 at 12:05 pm

    [http://codepen.io/anon/pen/lsztg](http://codepen.io/anon/pen/lsztg “”)

    Please refer to the CodePen above. I am creating a classic fixed menu.

    To do this properly I need to move the rest of the content of the site down the page a number of pixels equal to the height of the menu. However, when I add a margin to the top of the rest of the content (#major_wrap) it adds that margin above the fixed menu rather than just to #major_wrap. How do I add the margin only to #major_wrap? I realize I can do this with padding but that doesn’t seem like the best solution.

    # May 20, 2013 at 12:10 pm

    Just set the `overflow` on the `center` wrapper

    # May 20, 2013 at 4:05 pm

    set top: 0; on the #menu_container

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".