Linking CSS and HTML files in different folders


#1

Hey everyone

I am trying to link my index.html file to my index.css file which are in different folder. I’ve tried adding “…” to go up a folder but I am not having any luck linking them.

Thanks in advance for your help!


#2

Read here about referencing assets (css, js, images etc.) situated outside DocumentRoot.
https://httpd.apache.org/docs/2.4/urlmapping.html

Instead of using Preview HTML I preview my content in browser through https://atom.io/packages/php-server


#3

It’s not clear based on your screenshot that there should be content to display, so it would be nice to see both files side-by-side.

How are you viewing the HTML file?


#4

Hey there,

I am viewing it in my chrome browser. See the file screenshots attached


#5

Here is the HTML file,

Thanks


#6

Thanks, I’ll have a look at this


#7

With your index.html file open in Chrome, please open the developer tools (ctrl-shift-i) and take a screenshot of your browser with the Elements tab open.