All of my links broke when I uploaded my page to a hosting service

77 Views Asked by At

I just built my first website from scratch. All of my CSS and images are linked just fine from my computer, but when I uploaded everything to my hosting site (using Fat Cow) all of the links broke. So now I have an unstyled page with no images.

My .html is in the root directory and there are folders for my CSS, Fonts, Images, and JS. My style sheets are currently linked like this:

<link rel="stylesheet" href="css/style.css" />

This is what I've tried so far:

  1. Moving style.css out of the CSS folder into the root and linking it as "style.css"
  2. Creating a new style.css directly in the root linking it as "style.css"
  3. Linking style.css (one in the root) as "root/style.css"
  4. Linking style.css (one in the root) as "fulldomainname/style.css"

This is my daughter's birthday present. Any help would be greatly appreciated!

Sarah

4

There are 4 best solutions below

0
On
<link rel="stylesheet" type="text/css" href="http://www.yoursitedomain.com/css/styles.css">

try the above code and upload via ftp

0
On
  • Check FTP and make sure files are Uploaded properly, I advice you to download one and check it's not corrupt while uploading.

  • Check file path with "http://..."

  • check with relative path as well.

if you can't find solution please share link of your site so i can check it out.

0
On

It could also be a server permissions issue, meaning that you have to set up permissions for all the files in project.
link

0
On

Try to give full link of your website like

    <link type="text/css" rel="stylesheet" href="http://www.yourwebsite.com/css/styles.css"/>

Put it into head section of your html page code.