www.webdeveloper.com
Results 1 to 4 of 4

Thread: Background repeats

  1. #1
    Join Date
    Nov 2003
    Location
    Oklahoma
    Posts
    3

    Background repeats

    I am trying to convert a site from tables to CSS, but I have run into a problem. I put in a background image, attached, no repeat. The image is roughly 800x600 and looks fine on my machine, but it repeats on machines using higher resolutions. I would like to keep the pages at a smaller size and center them on the screen if possible in CSS. How do I do this. Site is [http://www.blmsaferooms.com]
    Thanks

  2. #2
    Join Date
    Aug 2003
    Location
    In my house
    Posts
    4,004
    Code:
    body  {
    background-image: url('images/bigtornado7.jpg');
    background-attachment: fixed;
    background-repeat: no-repeat;
    font-family: Verdana, Arial, sans-serif;
    margin: 0px
    }
    That will stop the image from repeating.
    You could also reduce the background styles to
    Code:
    background: url('images/bigtornado7.jpg') fixed no-repeat;
    For more info, you can check out this link.

  3. #3
    Join Date
    Nov 2003
    Location
    Oklahoma
    Posts
    3
    Thaks a bunch, I didn't realize that I'd left that line off of my css page.

  4. #4
    Join Date
    Aug 2003
    Location
    In my house
    Posts
    4,004
    Originally posted by Graybeard
    Thaks a bunch, I didn't realize that I'd left that line off of my css page.
    You're welcome Glad you got fixed.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles