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

    Join Date
    Sep 2012
    Posts
    1
    Rep Power
    0

    Problem with background image alignment


    Hi guys, I'm new here and have a problem which I am having trouble solving.

    I'm fairly new to css and am still learning - the site I have created uses a template which I have modified. Its built up with a top bar, footer, side partition and main content section. I have an image which I want to cover all of the sections in the background. So far I can't get it to format properly - as I'm new I don't have the knowledge to sort this out. Can anyone suggest what I can do other than cutting the image up and distributing it over the sections?

    Any help or guidance would be deeply appreciated.
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    119
    Rep Power
    33
    It would help to see the css you have already but otherwise, set the image as a background on the body:
    Code:
    body {
      background: url("path_to_image") no-repeat top centre;
    }
  4. #3
  5. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,128
    Rep Power
    4304
    Welcome to DevShed Forums, stestatonda.

    simplypixie, remember that only American English spellings are valid for CSS property names and value keywords; "centre" should be "center".
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    119
    Rep Power
    33
    Woops - weirdly I normally end up spelling center instead of centre if writing I am so used to it

IMN logo majestic logo threadwatch logo seochat tools logo