SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot Stancy_McKatt's Avatar
    Join Date
    May 2002
    Location
    NW Tennessee, USA
    Posts
    164
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do I put a Background Image on a page?

    I want to use Css to put a background image on a page. BUT I can't seem to get it to work.

    The page is for : Http://spiderwebzetc.com/

    I want everything to show up as is, just with a bacground Image,behind it.

    Here's the part of the Css I'm haveing troble with.


    body {
    margin:0px;
    padding:0px;
    font-family:verdana, arial, helvetica, sans-serif;
    background:#000000;
    background-image: url("spweetc.GIF")
    scrollbar-base-color:#ccccff;
    scrollbar-arrow-color:#ceefbd;
    scrollbar-DarkShadow-Color:#0099ff;
    }

    It's a external sheet if that makes any diffrence.

    Thanks,
    ~Crys

  2. #2
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ditch the quotes around the image path and you'll be in good shape:

    body { margin: 0px; background: #ffffff url(../images/bg_mainpage.gif); }
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  3. #3
    SitePoint Zealot Stancy_McKatt's Avatar
    Join Date
    May 2002
    Location
    NW Tennessee, USA
    Posts
    164
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Still dosen't work.. Here's the page that I'm testing this on.

    http://spiderwebzetc.com/testing.html

    The CSS:

    http://spiderwebzetc.com/test.css

    The problem's probably a typo somewhere, *sighs* I don't know.

  4. #4
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually, I believe it's a combination of things. You're using an HTML 3.2 doctype with an @import CSS method. I don't know if those two are compatible.

    Ditch the doctype temporarily then change this line in your code from:
    <style type="text/css"> @import url("test.css"); </style>

    to this:
    <link rel="stylesheet" href="test.css">

    See what that does.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  5. #5
    SitePoint Zealot Stancy_McKatt's Avatar
    Join Date
    May 2002
    Location
    NW Tennessee, USA
    Posts
    164
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bingo, that solved the problem.


    Thanks a bunch!
    ~Crys

  6. #6
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Glad I could help. You've got a good editor in Arachnophilia by the way. That's what I started on.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes


Bookmarks

Posting Permissions

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