Grow your CSS skills. Land your dream job.

Menu jumps up when logged in as admin

  • # March 3, 2013 at 9:02 am

    It’s on my local host just a site I’ve been working on for practice. So here are 3 pictures.

    This is how it looks when I’m not logged in: [LINK](http://i.imgur.com/Mzsd8IV.jpg “LINK”)

    This is what happens when i log in: [LINK2](http://i.imgur.com/9aTxGr3.jpg “LINK2″)

    [CSS for menu](http://i.imgur.com/4FLWmSr.jpg “CSS for menu”)

    # March 3, 2013 at 9:07 am

    I’m not sure but it looks like your menu is positioned absolutely…so it’s linked to the top of the page…so it moves.

    Without seeing the live site I can’t say whether this positioning is required or not….my guess is that it isn’t….it rarely is.

    # March 3, 2013 at 9:56 am

    But so is my search form and that doesn’t move. Weird.

    What do you suggest me to do instead of absolute way ?

    # March 3, 2013 at 10:08 am

    Your search form is probably inside a positioned element while your menu is not, so it’s positioned absolute to the html element.

    # March 3, 2013 at 10:09 am

    I made it work :)

    Instead of top:160px i used Margin-top:-60px so that it moves a bit up from the content to the header instead of top:160px which makes it move from the top to bottom of the html document.

    # March 3, 2013 at 10:47 am

    I’ve said it before but it’s worth repeating…

    Using positioning (absolute/relative/fixed) should be one of the LAST way of laying out pages unless you are after specific effects that cannot be achieved any other way.

    It most certainly should not be used by default…there are much better, flexible and maintainable ways of laying out pages.

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

You must be logged in to reply to this topic.

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