www.webdeveloper.com
Results 1 to 5 of 5

Thread: background images

  1. #1
    Join Date
    Jul 2004
    Location
    The Land of Saints and Scholars
    Posts
    8

    Question background images

    Howdy all, just wondering if you can help me with a annoying problem I've been having. I inherited a website as part of some work experience im doing: www.physics.ucc.ie/laser/frameindex.htm
    I know frames are despised here but the site was already set up when i started work so thats one thing I definitely cant change (please dont hold it against me). I've been trying to add a fixed repeating background image to the web pages using the existing CSS file but no joy.
    I've been able to used CSS to add a background colour and I can add the background image to each page individually but I cant do it using CSS and its really bugging me!
    This is the code I've been using (actually I've tried loads of variations that I could find on the web, but this one doesnt work - just like all the others):
    body
    {
    background: #F0F8FF
    url("/images/background.gif")
    repeat fixed
    }
    Really hope you can help me!

  2. #2
    well that should work but is the background image at /images/background.gif or images/background.gif?

  3. #3
    Join Date
    Jul 2004
    Location
    The Land of Saints and Scholars
    Posts
    8

    Regarding /

    Sorry / was a typo. background.gif is in the images folder in my website folder so the url should be images/background.gif The code looks correct but I'll be buggered if I can get it to work!

  4. #4
    Join Date
    Nov 2002
    Posts
    4,473
    There must be something you aren't telling us. This works, frame or no frame:
    Code:
    body {
      background: url("mcp-rgb.gif") repeat fixed #F0F8FF;
    }
    Maybe it has to all be on one line...

  5. #5
    Join Date
    Jul 2004
    Location
    The Land of Saints and Scholars
    Posts
    8
    Thanks but I've tried putting it all on one line. I've also tried putting breaks in different places as advised by a number of the websites about CSS i visited. Nothing works!
    Im using Microsoft Frontpage to work on the site and I can't see the background in any of the views or the browser preview when I try the above code in the CSS file.
    And as far as I can tell all the other code in the CSS file is producing the desired results. I also talked to the guy who designed the site and the CSS file in the first place and he's as stumped as I am because he didn't put any restrictions on the addition of a background image.
    Have any of you guys experienced any similar problems with CSS? If so, have you been able to fix them? Or do ye know of any advanced troubleshooting sites for CSS?

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