PDA

View Full Version : Organizing files on Public_html



jeffkaplan88
04-28-2007, 11:29 PM
My apologies for stupid newbie questions. I've searched the forum and was unable to easily find help. So ...

I am newly signed up for HostMonster and uploaded my files to the public_html folder for my account -- which now has these files:

index.htm

main.css

images (sub-folder under public_html)

When I open my website address, what shows up is missing the template (from the main.css file) and images (from the image folder).

I assume it's because the coding in the index.htm does not correctly indicate the location of the main.css and images files. It worked perfectly when I tested my homepage in my browser before uploading it to HostMonster.

Anyone know how to fix this? Do I need to fix the code in my index.htm and/or put the main.css and image files somewhere else?

Thanks and sorry for the newbie ignorance. I thought I had it ready to go before I started on HostMonster.

sjlplat
04-28-2007, 11:47 PM
Under the <head></head> section of your index.htm file, place this line:

<link rel="stylesheet" type="text/css" href="./main.css">

Make sure all your image paths are ./images/imagefile. For example: If you have an image named "image.jpg", the code to insert it on your index.htm page would be <img src="./images/image.jpg">.

The ./ indicates that you want the browser to look in the current directory of the index.htm file. Anything following that will lead to the location of your other files.

jeffkaplan88
04-29-2007, 12:17 AM
Thx thx thx!

I will try that. I was not sure how to reference the other files in the index.htm.

I'll let you know how it goes.

jeffkaplan88
04-29-2007, 12:45 AM
OK, the homepage works perfectly (almost). But I have to ask another stupid question. Sorry.

I have uploaded a second page for the website into the public_html folder. Let's call it: website.com/2ndpage

Then I tried hitting the link to it from the homepage and got an error message that URL did not exist. And just opening the file within HostMonster shows it, but again without the photos. So two problems, I guess.

Any ideas? Maybe it just takes a little time to get loaded to the Web?

sjlplat
04-29-2007, 01:22 AM
To create a link to another page in the same directory, use the following code:

<a href="./2ndpage">Link Text Here</a>

Make sure you include the name of the file and the extension. For example: "file.htm" would not work if you used "file" without the ".htm" extension.

jeffkaplan88
04-29-2007, 09:27 AM
Really. I appreciate your patience with a newbie.

eusty
04-29-2007, 05:17 PM
And remember that Unix is case sensitive, so file1.jpg is different to File1.jpg

sjlplat
04-30-2007, 07:45 AM
Really. I appreciate your patience with a newbie.

That's what we're here for. :)