• Archives

  • Having a fixed image

    By admin | January 11, 2008

    Sometimes you want your image to be fixed in a certain which not be scrolled down with the rest of the page:

    This css code will help you do that

    .something{

    background-image: url(‘imagename.gif’);
    background-repeat: no-repeat;
    background-attachment: fixed
    }

    See the properties first we give the url of the image to be shown using background image property

    then we add a no-repeat to stop repeating of image

    And theen we add a background attachment that fixes the image like a glue

    Thanks

    krates

    Topics: CSS | Comments Off on Having a fixed image

    Related Links: