Grow your CSS skills. Land your dream job.

Navigation bar moves on (Zoom in & Zoom out)

  • # February 9, 2013 at 11:07 pm

    So as the title, need some help.
    Cant get my Navigation Images to stay in position.

    #menuhome
    {
    position: absolute;
    width: 200px;
    height: 150px;
    top: 20px;
    left: 920px;
    background-image:url(images/home.png);
    background-repeat: no-repeat;
    }

    #menuhome:hover {
    background-image : url(images/homehover.png);
    }

    # February 10, 2013 at 4:14 am

    Can you put this in Codepen?

    However, my initial guess is because you are using absolute positioning.

    It’s just my opinion but absolute position is usually a BAD idea unless you are trying to achieve something specific.

    The are better, more flexible and easier to maintain ways of laying out your page.

    Also, this is because a declared pixel is not really a screen pixel :http://www.quirksmode.org/blog/archives/2010/04/a_pixel_is_not.html

    Eventually the way the browser will run out of space trying to cram all the pixels you have declared into a set width and the page breaks.

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

You must be logged in to reply to this topic.

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