PDA

View Full Version : image coding ? ? ?


minpot
06-19-2007, 09:01 PM
i'm having some strange problems, i guess i'm so basic & new at all this that i am not able to discover why is not working.

I have my images uploaded on my site inside some cells. These images are inside my image folder, which i assume, their code should be something like this: <img scr= "../images/beach_01.jpg" height and with etc >
but instead my code does not have the ../ meaning my image is inside the folder. As i manually write it on the code or on the Src little window in my property panel, the image link breaks
Any help regarding this? I'm done with everything to upload site on server but is giving me this problem
Thanks
Thanks

domedia
06-19-2007, 09:05 PM
If you properly set up a site definition before you started this should not be a problem. You insert->image and choose the image and the path should be right. If you did this, post some code (we almost always need code to see what is going on) and hopefully that will help show what the problem is.

minpot
06-19-2007, 09:13 PM
<img src="/images/Beach_01_peq..jpg" alt="beach" width="125" height="92" /> this is the code on my index page for one of the images there
and
<img src="../images/mar_azul_peq.jpg" width="203" height="156" border="1" />
this is the code of another image (which has a link to an identical but bigger images) and does have the ../
Domedia you are a diamond member i'm not even a jr. one, i should be a kindergarten one . . . . is not easy to understand as you imagine I should . . . thanks but can you give me more details . . . .
thank you very much
m

Cary
06-19-2007, 11:27 PM
You say your images are in your image folder. Is the image folder in the same folder as the html or in the folder above your html?

If the image folder is in the same folder as the html then "images/Beach_01_peq.jpg" should work.

If the image folder is in the folder above your html folder then you would use the "../" in front of the image path. For example if you had "www.mypage.com/html/index.html" and the image "www.mypage.com/images/pic.jpg", the html code could use the path "../images/pic.jpg". The code "../" tells the browser to look for the images folder one level up from the current folder. "../../" tells the browser to look for the images folder two levels up, etc.

Just a "/" at the beginning of the path tells the browser to start looking for the images folder in the site's root directory or top-level directory.

The relative paths in a style sheet are relative to the style sheet, not the html page linking to the style sheet.

minpot
06-20-2007, 01:32 AM
now . . . . for me to understand better if you can pls. explain:
1. image folder is in the same folder as the html folder?. I have my site as the big one folder and it contains all the other folders, like contact with its contact.html inside, gallery and its gallery.html inside . . . . and index.html by itself without a folder is in the main site folder.

2. what exactly means a folder one level up from the current folder .. . . .
3. what does it mean "The relative paths in a style sheet are relative to the style sheet"
I build or make my style sheet with whatever i want to apply to things around the site . . .
4. and if you by any chance have any knowlede of a show gallery? i downloaded some extensions for that but they are not working . . .

thanks

Cary
06-20-2007, 02:42 AM
1. image folder is in the same folder as the html folder?...

I was asking if your "images" folder was in the same folder as your html files.

...I have my site as the big one folder and it contains all the other folders, like contact with its contact.html inside, gallery and its gallery.html inside . . . . and index.html by itself without a folder is in the main site folder.

Your description seems to imply multiple image folders. Have you defined the site in DW? As Domedia said, you shouldn't be having a problem.

2. what exactly means a folder one level up from the current folder .. . . .

For your site you have the one big folder you referred to. This would be your root directory. It contains your "index.html" and some sub-folders, or sub-directories, such as "contact" and "gallery".

If you were looking in the "gallery" folder, one folder or directory level up from there would be the main folder, your root directory.

3. what does it mean "The relative paths in a style sheet are relative to the style sheet"

If your html code contains a file path or link such as "http://www.mysite.com/images/pic.jpg", that path is absolute. Everyone who follows that path will end up in the same spot on the web, regardless of where they start out.

However, a path such as "../images/pic.jpg" is a relative path. You need to be in the right starting location on the web for that path to land you on pic.jpg. That path is relative to the document containing it, either your html page or your style sheet.

If an html file and its style sheet are located in different folders or directories, relative paths in the style sheet will not point to the correct locations in the website if they are relative to the location of the html page rather than the location of the style sheet itself.

4. and if you by any chance have any knowlede of a show gallery? i downloaded some extensions for that but they are not working . . .

That I'm afraid I know nothing about.

minpot
06-21-2007, 01:32 PM
yes i defined my site in DW before i do anything is somehting like this for example:, root site: is the name of my site, inside it there are the rest of folders and file index.html

www.thesitename.com (http://www.thesitename.com)

under this i have several folders like:
gallery, links, contactme, images, index.html
i
nside these i have the files like:
gallery.html, links.html, contacme.html, (inside images folder): boat_1.jpg, boat_2.jpg, selfpotrait.jpg.

These as i understand is my subdirectory.

Am i right?

Cary
06-23-2007, 06:57 PM
yes i defined my site in DW before i do anything is somehting like this for example:, root site: is the name of my site,...under this i have several folders like:
gallery, links, contactme, images...These as i understand is my subdirectory.

Am i right?

Yes, that's correct.