Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Problem : My menu is fixed on the top but the rest of the page comes up

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #173570
    grafic.web
    Participant

    Hi, i really can’t make it…

    I am trying to fix my menu on the top and that is working but all the rest of the page comes up under my menu… how comes??

    MOD EDIT: Codedump Removed

    #173574
    __
    Participant

    Please, do not “dump” your code. This is hard to read through, especially on a forum, and discourages people who would normally try to help you out.

    Show us the specific part you are having trouble with. If you’re not sure, make a reduced test case or give us a link to your actual page so we can check it out. When you need to share huge amounts of code, use an online service that is designed for this purpose (e.g., make a gist on github).

    I am trying to fix my menu on the top and that is working but all the rest of the page comes up under my menu… how comes??

    Because:

    position:fixed;

    That’s what fixed positioning is supposed to do. Fixed elements aren’t “part of the flow” of the webpage anymore: they don’t affect the layout or positioning of other elements anymore.

    If you don’t want the menu to overlap the rest of your content, you would need to add a margin or padding to push the content down. Example (codepen).

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.