images not showing up in DIV

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • t3nnisstud
    New Member
    • May 2007
    • 1

    images not showing up in DIV

    Hello,

    this is my code and i use FF

    .main {
    position:absolu te;
    margin-left:-100px;
    width:600px;
    height:682px;
    z-index:3;
    left:100px;
    top:148px;
    background-color:000000;
    <img src="http://i53.photobucket .com/albums/g77/t3nnisstud/O3redoverlay.jp g">
    }

    for some reason the image doesn't show up.
    can someone tell me why?
    i get the bckground color but no image.
  • cazconv2007
    New Member
    • Feb 2007
    • 30

    #2
    Is this your css file if it is you need to put the image tag in your html file with the div class i.e
    html file
    <div class = "image">
    <img src = "image.jpg" >

    css file

    .image {
    float:left;
    width: 20%;
    border: thin solid black;
    padding: 10px 20px 40px 5px;
    margin: 50px;
    font-family:arial;
    }
    this is within a box but if you fiddle it should be fine

    Comment

    • drhowarddrfine
      Recognized Expert Expert
      • Sep 2006
      • 7434

      #3
      Unless he's trying to make it a background image. In that case, your image tag in the css won't work because it's html. Do this in your css instead:
      Code:
      background-image:  url("http://i53.photobucket.com/albums/g77/t3nnisstud/O3redoverlay.jpg")

      Comment

      Working...