#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    110
    Rep Power
    13

    css: background repeat = none?


    I am looking for a way to keep a css background picture in one absolute position. When I scroll down the page I need the picture to stay in that one place. Does anybody know what attributes I would need to put in this css to make that happen? Thanks in advance.


    .logo { background: url(images/logo.jpg);
    background-repeat: no-repeat;
    background-attachment: fixed;
    position:absolute;left:10px;top:10px;
    }
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Nov 2001
    Posts
    1,882
    Rep Power
    19
    if it is the background image for a page then you need to assign it to the body

    body {
    background-attachment: fixed;
    background-image: url(images/logo.jpg);
    background-repeat: no-repeat;
    }

IMN logo majestic logo threadwatch logo seochat tools logo