background-image doesn't work

Discussion in 'CSS' started by +:::Spider25:::+, Apr 24, 2006.

  1. #1
    background-image: url("marble.gif")<html>
    <head>
    <title>Ejemplo</title>


    <head>
    <body style="font-size:9px;font-weight:bold;font-family:Arial">
    <div style="padding:8px;height:150px;width:250px;background-image: url("red.jpg") ">
    <img style="width:60px;height:90px;margin:7px" src="0000221786-007.jpg" />
    <img style="width:60px;height:90px;margin:7px" src="42-15347032.jpg" />
    <img style="width:60px;height:90px;margin:7px" src="lavado de pies.jpg" />
    <div style="text-align:center">
    <span style="margin:7px;width:60px;text-align:center;">
    The Pope
    </span>
    <span style="margin:7px;width:60px;text-align:center;">
    The Cross
    </span>
    <span style="margin:7px;width:60px;text-align:center;">
    Washing
    </span>
    </div>
    </div>
    </body>
    </html>

    <!--
    **********************
    Hi , my code is here and I can not make Backgroung-image works, What am I doing worng?

    Thaks a lot
    -->
     
    +:::Spider25:::+, Apr 24, 2006 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    Be sure the images are in the same directory as the document. Path errors are the number one cause of disappearing images. ;)

    Remove the quotes from the bg images' file names.

    Do not put styles in a style attribute within the element. Use a style sheet in the document head (especially during development) or externally (after the template page has been developed).

    cheers,

    gary
     
    kk5st, Apr 24, 2006 IP
  3. Tribolis

    Tribolis Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    <div style="padding:8px;height:150px;width:250px;background-image: url("red.jpg") ">

    to

    <div style="padding:8px;height:150px;width:250px;background-image: url("red.jpg");">

    If you want to repeat the background image, use repeat;

    src="0000221786-007.jpg" /> = make sure you put directory path where you upload the images, eg: src="path/to/image.jpg" />
     
    Tribolis, Apr 25, 2006 IP