SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Background image in CSS

    Would someone be able to tell me what I am doing wrong? I can't get a background in my css, and I've been trying for a week. I have Explorer 6. I've tried everything: using shorthand, not using shorthand, using HTML, using CSS2 comments/CSS1 comments, putting in the entire pathway, etc. Code is below. Thank you.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
    "http://www.w3.org/TR/REC-html40/strict.dtd">
    <html>
    <style type="text/css">
    BODY { background: url(../starbackground.gif) repeat 100% } /* the proper syntax for background shorthand is background-color, background-image, background-repeat, background-attachment, background-position, with no commas or semicolons, just spaces -- allegedly, according to blazonry.com */
    TEXT { decoration: none }
    </style>
    </html>

  2. #2
    SitePoint Guru nagrom's Avatar
    Join Date
    Jul 2001
    Location
    Western CT, USA
    Posts
    803
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    shouldn't that be background-image?

    BODY { background-image : url(../starbackground.gif) repeat 100% }


    also, i think if you want to use the strict DTD, your style declaration needs to be between the <head></head> tags



    and try to avoid cross-posting in the future

  3. #3
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Morgan...

    "Background" used in the method he is using it in is a shorthand which allows you to set all of your background elements at one time.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  4. #4
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    body { background-image: url(../starbackground.gif);
    background-repeat: 100%; }

    is 100% an option for repeat?

    Sketch
    Aaron Brazell
    Technosailor



  5. #5
    SitePoint Guru nagrom's Avatar
    Join Date
    Jul 2001
    Location
    Western CT, USA
    Posts
    803
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh yeah! thanks creole!


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
  •