Search code examples
htmlcssfile-manager

How to reference external css file in file manager - Domain.com


I'm having trouble referencing an external css file in my file manager. My html page is in a folder called "homepage" and my css file is in a folder called "library".

Currently, I have

  <link rel="stylesheet" href="library/homepagecss.css">

but that won't reference the css file.

My only option is to have the homepage html file and css file in the same folder but i'd like to have them separated for organization.

Anyone know how to do this in Domain's file manager?


Solution

  • You should either write an absolute path there, like

    <link rel="stylesheet" href="C:/User/Documents/public_html/library/homepagecss.css">
    

    (I am assuming your path to the current directory)

    BUt if I understood well your both folders library and homepage are in the same folder called public_html you can try this one

    <link rel="stylesheet" href="../library/homepagecss.css">
    

    By entering .. you go up in the directory tree, you go up at the parent directory, and you need to go up at public_html cause there is where you library folder is located.