Search code examples
htmlcsshref

<link rel="StyleSheet" type="text/css" href="../filename.css"> not working


I'm trying to link my css file into my html file using "../" but I do not have any idea why it is not working. can you please help me..thank you in advance.


Solution

  • Try using an absolute path to link the stylesheet instead of a relative path.

    Per your comment above if you have a css folder that your css files are in, then that folder should be referenced in your path as well IE: "cssfolder/filename.css".

    If you insist on using a relative path then coupling your css folder with the information you provided your link would be:

    <link rel="StyleSheet" type="text/css" href="../cssfolder/filename.css">
    

    Replace 'cssfolder' with the name of your css folder