-1

For the index file

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

That works fine no problem here though.

The rest of my html documents are in a folder called "pages". Here though it cant find my CSS sheet. I tried

<link rel="stylesheet" href="../oliverteglhus.dk/css/stylesheet.css"/>

Does not work. Sorry for this noob question. It's just bugging me.

Vucko
  • 20,555
  • 10
  • 56
  • 107
OliverTeglhus
  • 21
  • 1
  • 1

3 Answers3

0

it should be:

<link rel="stylesheet" href="../css/stylesheet.css"/>
rlatief
  • 715
  • 5
  • 14
0

If the rest of your documents are in a folder that is in the same directory as your index file, then you only need to go up one directory to find your CSS file:

<link rel="stylesheet" href="../css/stylesheet.css"/>
Adam Jenkins
  • 51,445
  • 11
  • 72
  • 100
0

So, if your directory structure looks like this:

-index.html
-pages
    page1.html
    page2.html
    etc...
-css
    stylesheet.css

To load the stylesheet.css from CSS folder in page1.html, you have to use like

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

Check this answer for a more detailed explanation

Community
  • 1
  • 1
Vucko
  • 20,555
  • 10
  • 56
  • 107