Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Internet & the Web (https://www.askmehelpdesk.com/forumdisplay.php?f=177)
-   -   Images not shown on website file (https://www.askmehelpdesk.com/showthread.php?t=348105)

  • Apr 30, 2009, 03:04 PM
    Sunaina
    Images not shown on website file
    Hello guys,

    I made a website, it works fine when I open it from the site root folder, but the images are not shown when I upload it to my website through FTP.

    The file looks like this,

    File:///C:/Users/Mahnoor/Desktop/NewWShop2/home.html

    What I think is, it's file:/// is the problem... what you think?

    Will you please guide me to fix the problem...

    Many thanks.
  • Apr 30, 2009, 08:35 PM
    BenReilly
    Hi,

    Yes the file:/// is the problem, the easiest way is to replace the code with the absolute location to the picture.
    One example would be "http://www.yourdomain.com/picture.jpg" should you have an extra directory for the pics then it would look something like this "http://yourdomain.com/images/picture.jpg"
    It is kind of tough not knowing the file structure. Which program did you use to create the site because most will give you an option to insert pictures that are relative to the file structure and will work instantly after uploading.

    Most html editors allow to change the location of the picture by right clicking on it and click properties.

    Hope that helps.
  • May 1, 2009, 11:15 AM
    Sunaina

    I used Dreamweaver my site... and yes I've used both ways to fix the problem e.g. by making an extraw folder just for images in a site root folder(destination folder)... and by putting all the html files and images in same folder... but it didn't help:(

    Do have any idea why it happens?
  • May 1, 2009, 11:27 AM
    Sunaina

    My coding is like this,

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Hennas Corner</title>
    <style type="text/css">
    body {
    background-color: #709343;
    font-size: small;
    font-family: Verdana, Geneva, sans-serif;
    text-align: center ;
    color: #030;
    margin:0px;
    width:955px;
    line-height:1.5em;
    }

    #header {
    background-color:#0709343;
    width:955px;
    margin:30px 0px 0px 150px;
    }
    #welcomeTxt {
    background-color: #363;
    width:955px;
    margin:5px 0px 0px 150px;
    text:#0709343;
    padding:25px;
    padding-left:0px;
    padding-right:0px;
    color: #300;
    }
    #footer {
    width:905px;
    margin:20px 0px 50px 150px;
    padding:25px 25px 25px 25px;
    color: #030;
    background-color:#363;
    }

    #navcontainer{
    padding:10px 10px 10px 10px;
    margin:10px 0px 25px 145px;
    list-style-type: none;
    background-color:#300;
    width:940px;
    font:normal 90% arial, Arial, Helvetica, sans-serif;
    text-align:center;
    }


    #navlist li {
    display: inline;
    list-style-type: none;
    }

    #navlist a { padding: 10px 30px 10px 30px; }

    #navlist a:link, #navlist a:visited
    {
    color: #303 ;
    background-color: #d67517;
    text-decoration: none;
    }

    #navlist a:hover
    {
    color:#030;
    background-color: #369;
    text-decoration: none;
    }
    </style>
    </head>

    <body>

    <div id="header">
    <a href="home.html"><img src="header.jpg" alt="header-1" width="955px" /> </a>
    </div
    >





    <div id="navcontainer">
    <ul id="navlist">
    <li id="active">
    <a href="home.html" id="current">Home</a></li>
    <li><a href="about.html">About me</a></li>
    <li><a href="gallery.html">Gallery</a></li>
    <li><a href="Fav.html">Favourites</a></li>
    <li><a href="contact.html">Contact</a></li>
    </ul>


    </body>
    </html>
  • May 1, 2009, 11:54 AM
    WebsiteSolution

    When you inserted the photo through dreamweaver, did you select "relative to" document?

    Insert
    Image
    Select Image Source box opens
    Look all the way at the bottom for "relative to", click document
  • May 1, 2009, 12:33 PM
    Sunaina

    I've checked and it says

    Relative to: Document
  • May 1, 2009, 12:57 PM
    WebsiteSolution

    Can you post a link to the page?
  • May 1, 2009, 01:04 PM
    BenReilly
    I do not see a problem in the code based on the part:
    <div id="header">
    <a href="home.html"><img src="header.jpg" alt="header-1" width="955px" /> </a>
    </div>

    It only shows the file:/// link when I start the file from Desktop like it should but on my webserver it works like it is supposed to.
  • May 1, 2009, 01:08 PM
    WebsiteSolution

    That's all I see also Bill in what she posted, that's why I want to see a link to the actual page, maybe we are missing something.
  • May 2, 2009, 07:12 AM
    Sunaina

    Here is the link

    Wrkshops.freehostia.com
  • May 2, 2009, 07:16 AM
    Sunaina
    But when I open home.html file from the local root folder on my PC... it shows like this file:/// triple slashes...

    File:///C:/Users/Mahnoor/Desktop/NewWShop2/home.html
  • May 2, 2009, 07:32 AM
    WebsiteSolution

    That's the problem. Like BenReilly stated earlier, if the file source is: file:///C:/Users/Mahnoor/Desktop/NewWShop2/home.html, that means it is loading from your desktop. It should be in a folder with the rest of the page files. For example, you directory should look something like:
    c://Sample Directory/images/abcImage.jpg
    (this would be your image folder)

    Your page directory should look something like this:
    c://Sample Directory/home.html

    The entire directory should be uploaded to your website. If the photos still don't appear, that means you have not linked and uploaded everything properly
  • May 2, 2009, 07:48 AM
    WebsiteSolution
    At quick glance, I see that the color code is incorret for header - it has an extra "0" at the beginning of the color code. Also for some reason, none of your photos show up in the directory when they are clicked, something funky is going on -- probably something simple -- Ill look at the code later today when I have more time and try to figure something out.
  • May 4, 2009, 03:33 AM
    Sunaina
    Quote:

    Originally Posted by WebsiteSolution View Post
    Thats the problem. Like BenReilly stated earlier, if the file source is: file:///C:/Users/Mahnoor/Desktop/NewWShop2/home.html, that means it is loading from your desktop. It should be in a folder with the rest of the page files. For example, you directory should look somthing like:
    c://Sample Directory/images/abcImage.jpg
    (this would be your image folder)

    Your page directory should look something like this:
    c://Sample Directory/home.html

    The entire directory should be uploaded to your website. If the photos still dont appear, that means you have not linked and uploaded everything properly

    I don't really get this, what do u mean by (it should be in a folder with rest of files... ) bcoz all the file are already in the same folder called NewWshop2 which is placed on Desktop.

    Make it clear.
  • May 4, 2009, 04:25 AM
    insubbu
    Hi Sunaina

    Please send file structure of your root files
    And I will tell you what's the problem

    And I will be available on gmail chat [email protected]

    Thanks
  • May 7, 2009, 01:54 PM
    Sunaina

    Help me in solving the problem:(
  • May 7, 2009, 01:55 PM
    Sunaina
    Anyone..
  • Sep 1, 2009, 07:47 PM
    Golden_Girl
    Quote:

    Originally Posted by Sunaina View Post
    anyone.........?

    Have you figured out the problem is yet Sunaina?

  • All times are GMT -7. The time now is 02:59 AM.