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

    Join Date
    Jan 2014
    Posts
    2
    Rep Power
    0

    Background Image


    I'm kind of a newbie at CSS and I have background image I want to add, but when I'm scrolling through the page the image repeats itself and when there's no repeat, it stretches the image. I'd like to know how to have the image stay in one spot but all the page content move when scrolling. (Kind of like the twitter page)
  2. #2
  3. No Profile Picture
    Super Moderator
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2009
    Location
    Hartford, WI
    Posts
    1,170
    Rep Power
    22
    Overall, it sounds this is what you may be aiming at.
    Code:
    background-image:url('image.ext');
    background-repeat:no-repeat;
    background-attachment:fixed;
    background-position:center;
    And one page I came across that seems rather descriptive.
    http://reference.sitepoint.com/css/background-position
    He who knows not that he knows not is a fool, ignore him. He who knows that he knows not is ignorant, teach him. He who knows not that he knows is asleep, awaken him. He who knows that he knows is a leader, follow him.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2014
    Posts
    2
    Rep Power
    0
    Originally Posted by Triple_Nothing
    Overall, it sounds this is what you may be aiming at.
    Code:
    background-image:url('image.ext');
    background-repeat:no-repeat;
    background-attachment:fixed;
    background-position:center;
    And one page I came across that seems rather descriptive.
    http://reference.sitepoint.com/css/background-position
    Thanks! Helped a lot.

IMN logo majestic logo threadwatch logo seochat tools logo