Jump to content

my image doesnt appear :(


Vihart

Recommended Posts

Im sorry again for posting yet another noobie post but ive tried for a while now and i cant seem to get an image to appear on my test website The file is jpeg and is in the same folder as the test website files so it must be the code thats wrong <img border="0" src="/images/mio paint.jpg" alt="mio paint" width="304" height="228" />The jpeg file is called mio paint and is in a folder called website creation(with the rest of the web files - the outline of the image box appears but no image inside.Do i need to make an image folder and place the mio paint file into the images folder ? and does the image folder need to be same folder as the website files :/I tried this and it still doesnt work*undated the code now looks like this and still doesnt work<img border="0" src="/images/miopaint.jpg" alt="miopaint" width="304" height="228" />

Link to comment
Share on other sites

yes, if your image isn't in a folder called images, then you need to make one in whatever folder your test webpage is located in. However, you can also have the image in the same folder, just change the path in the <img> tag. You can put a file anywhere that's accessible to the file system, its just a matter of where it makes the most sense to put it so that your site is portable. Once you've sorted the files location (typically most people keep their images in an images folder) then you have two other things to keep in mind. Make sure the extension in the path is exactly like file, casing included. Another good habit is not to have spaces or "unnecessary" characters in your file name. A good alternative to spaces is using and underscore, _, or camel casing your file names, i.e. thisIsMyImage.jpg.

Link to comment
Share on other sites

still doesnt work - ive changed the folder name miopaint to avoid any complications heres the new code<img border="0" src="/images/miopaint.jpg" alt="miopaint" width="304" height="228" />the miopaint jpg file is in a file called images - and the file called images is in a file called website creation and all the other stuff is in there too (all the other web page test pages) still cant understand why it doesnt work - does my computer have anything to do with it ? its vista basic and im using google chrome if that makes any difference :/o and the jpg file was from the programme paint if that makes any difference too :/

Link to comment
Share on other sites

<img border="0" src="/images/mio paint.jpg" alt="mio paint" width="304" height="228" />
<img border="0" src="/images/miopaint.jpg" alt="miopaint" width="304" height="228" />
This may or may not be the problem but there is a space in the file name the first time and the second time there is no space, i dont know if this was intentional or accidental but i would recommend eliminating that space on the file and in the code to avoid any possible problemos.
Link to comment
Share on other sites

This may or may not be the problem but there is a space in the file name the first time and the second time there is no space, i dont know if this was intentional or accidental but i would recommend eliminating that space on the file and in the code to avoid any possible problemos.
yes i eliminated the space so now it looks like this and it still doesnt work <img border="0" src="/images/miopaint.jpg" alt="miopaint" width="304" height="228" />
Link to comment
Share on other sites

yaaaaaaaaaaaaaaay !!!!!!!!!<img border="0" src="/images/miopaint.jpg" alt="miopaint" width="304" height="228" /><img border="0" src="images/miopaint.jpg" alt="miopaint" width="304" height="228" />see the difference - that was the problem :) (the " / " )thanks for the help guys anyway

Link to comment
Share on other sites

I believe having a / like that tells the browser to look at the root of the filesystem and then start from there. Since you folder is located somewhere down the trail, you would want to leave that out.

Link to comment
Share on other sites

I believe having a / like that tells the browser to look at the root of the filesystem and then start from there. Since you folder is located somewhere down the trail, you would want to leave that out.
thanks for the explanation its much appreciated
Link to comment
Share on other sites

Just to clarify...

...having a / like that tells the browser to look at the root of the website's filesystem and then start from there.
It's important to know that this looks at the root of the website not the root of the entire filesystem. The difference is this:Typically website roots reside in a directory similar to this (on Windows that is):C:\Inetpub\www\The filesystem root would be:C:\
Link to comment
Share on other sites

Just to clarify...It's important to know that this looks at the root of the website not the root of the entire filesystem. The difference is this:Typically website roots reside in a directory similar to this (on Windows that is):C:\Inetpub\www\The filesystem root would be:C:\
ah, good catch.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...