hello everyone i cannot link my css stylesheet to index.html

Status
Not open for further replies.

youngmil

New Member
Messages
2
Reaction score
0
Points
1
Hello everyone, i am new to x10hosting

in my public_html, i have my index.html
i have a folder called css inside the folder, style.css

in html,
i have this link in <head> <link rel="stylesheet" href="../css/style.css" /> </head>

they are both in different folders of course.

I have uploaded a snapshot of my folder structure to be 100 clear.

Not Found
The requested URL /html/VanguardFund.html was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Is there something wrong with this ???
 

Attachments

  • x10hosting.PNG
    x10hosting.PNG
    6.2 KB · Views: 7
Last edited:

Anna

I am just me
Staff member
Messages
11,772
Reaction score
591
Points
113
Every file and folder related to your website needs to be inside the public_html folder.

From the looks of the picture you posted most of your files are located outside of that folder, which is why they do not work properly, they are not web accessible.

Also it is important to keep in mind that we run linux on our servers which is a case sensetive OS, meaning Index.htm is not the same as index.htm for instance.
 
Last edited:

youngmil

New Member
Messages
2
Reaction score
0
Points
1
Every file and folder related to your website needs to be inside the public_html folder.

From the looks of the picture you posted most of your files are located outside of that folder, which is why they do not work properly, they are not web accessible.

Also it is important to keep in mind that we run linux on our servers which is a case sensetive OS, meaning Index.htm is not the same as index.htm for instance.

Ok i have placed all of the folders css,img,html inside public_html now,
but still getting the same error

<a href="/public_html/html/VanguardFund.html">Learn about Vanguard Fund </a>
 

Anna

I am just me
Staff member
Messages
11,772
Reaction score
591
Points
113
Remove the /public_html/ from your links.

Assuming index.html is directly in the public_html folder, and the VanguardFound.html file is in /public_html/html/ the link you should be using is: <a href="./html/VanguardFund.html">Learn about Vanguard Fund </a> where ./ indicates the point where the file you are linking from is located.

In the VanguardFund.html document to link back to the index.html you would do <a href="../index.html">Start Page</a> (index.html can be left out since that is what the server defaults to showing in any folder, the ../ means "start where you are and go up one level".
 
Status
Not open for further replies.
Top