HTML Editor 2008

User 562163 Photo


Registered User
5 posts

Hi, first let me say i'm so impressed with this website and software - its very good and at a cool price too - i bought the book too which i'm slowly going through.

The problem i'm having is that i can create a website in HTML editor, i create a new project like in the tutorial and save it to my desktop ie c:/users/name/desktop/project

everything works fine until i want to have pictures or link to different pages.

I saved a picture in the project in a images folder

c:/users/name/desktop/project/images

but in html <img src=“/images/name.jpg” /> i only get a red x.

I know i have to create a folder and then subfolders (i have used dreamweaver before) but i can only get the image to appear if i do the whole path.

I also cannot link to another html page within the same project as it does not find the page.

What am i doing wrong?

Thanks:/
User 463058 Photo


Ambassador
1,080 posts

The editor's preview and external browsers look in the wrong spot when using root-relative paths. The example path you gave makes the browser look here:

c:/images/name.jpg

If you're going to use root-relative paths, you'll need to do your page checking on a server.
User 562163 Photo


Registered User
5 posts

Thanks, silly question but how do i do that? as that is what i would like to do.
User 562163 Photo


Registered User
5 posts

Hi, any ideas, i want to create a whole project that i can upload onto a hosting package but with all the correct folders and paths all contained with the same flders and sub folders, when using dreamweaver i can do it straight from the c drive but on herei cannot, this is really confusing me and its not covered in the tutorial, any help would be appreciated.

Thanks
User 239547 Photo


Registered User
28 posts

I am a beginner but have something you can try.

<img src=“images/name.jpg” >

I believe the slash before the directory name causes it to go to the root directory. This way it will look for the image directory in the same place as your html file.

Please correct me if i am wrong. Good luck.

Mark
User 562163 Photo


Registered User
5 posts

this is very interesting, i saved my project and now i have reopened it a day later, now i can use <img src=“name.jpg” /> and it works. i have no idea why tho.

Will this have any impact when i upload via ftp to a hosting site?
User 239547 Photo


Registered User
28 posts

Not sure why that works unless your html file is in the same directory as the name.jpg file.

In order to simplify it when you upload to a host you will want your paths to be relative. The simplest would be to include all your html files and image files in the same directory and use the path you have working now. The problem is that this gets pretty confusing if your website has any complexity at all.

I create a subdirectory to hold all the images (or multiple if necessary) and then use

img src="images/name.jpg"

Here is something to try:
When you have your html file open in HTML Editor 2008 and have "Files" selected on the left of the screen do you see both your html file and the images directory? If so put the cursor in the code where you want the image to be. then double click the images directory and drag the image into the code. It should put in the relative path for you.

Mark
User 37670 Photo


Registered User
2,138 posts

Hi. Jumping in late here but this sounds like a "save file" issue. I have found that when you create a web page, Save it with a unique name first, then build the page. That way both the program and Windows know where things belong and files are saved/inserted with the correct code.
E-Learning Specialist
www.mainsites.ca is my website, and yes, some of it is crappy.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.