Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jul 2010
    Location
    Arizona
    Posts
    111
    Thanks
    14
    Thanked 0 Times in 0 Posts

    hey i have an image that won't display on my website

    Hi, i was wondering if anyone could help me. I have an image on my website that just comes up with an outline and the little error thing in the upper left corner. The image name is firstpageimages.gif. it has z-index 1 and everything else is 2 and the background is 0. I'll post the html and css. The website is www.marksbodyshop.org Thank you very very much.

    html:
    Code:
    <div id="first">
    <img style="position:absolute;z-index:1;top:0;left:0;" src="...images/firstpageimages.gif">
    </div>
    main.css:
    Code:
    #first {
         width:100%;
         height:100%;
    }
    defult.css:
    Code:
    #first {
         width:100%;
         height:100%;
    }
    defult2.css:
    Code:
    #first {
         width:100%;
         height:100%;
    }
    Last edited by Repatilian; 05-18-2012 at 08:31 PM. Reason: forgot to add website

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,665
    Thanks
    6
    Thanked 1,006 Times in 979 Posts
    If the “little error thing” comes up then the file path is wrong or the image isn’t existing, I can tell you that without even finishing to read your post. Now, I did read on a little further and can then also tell you that if this (...images/firstpageimages.gif) is actually the value of the src attribute then no wonder it can’t find and show the image. Assuming that your image is in a directory called “images” on the same level as your HTML file the file path must look like images/firstpageimages.gif. If the image directory is one level above the HTML file (i. e. the HTML file is in a directory itself that is on the same level as the images directory) the file path must be ../images/firstpageimages.gif (two periods and a slash).

    And P. S.: The img element requires an alt attribute, even if you leave value empty.

  • Users who have thanked VIPStephan for this post:

    Repatilian (05-18-2012)

  • #3
    Regular Coder
    Join Date
    Jul 2010
    Location
    Arizona
    Posts
    111
    Thanks
    14
    Thanked 0 Times in 0 Posts
    that fixed it thanks.


  •  

    Posting Permissions

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