How can I get the css working on the index.html files that are in sub-folders?
I already tried …/css/main.css, but it does not work
Or is there a better practice?
Thank you for your time
How can I get the css working on the index.html files that are in sub-folders?
I already tried …/css/main.css, but it does not work
Or is there a better practice?
Thank you for your time
Two preceeding dots takes you to the preceeding folder. Try two instead of three leading dots and see if that helps.
..
means ‘go up one level’. (Disqus translates two dots into 3 automatically because… reasons?)
If you’re in /chapter/0/, and go up 1 level, and then go to css/, you end up at /chapter/css. But your CSS folder isnt there.
Thanks, I didn’t know that.
chapter/0/index.html
css/main,css
from the index page: The relative path would be
../../css/main.css
It might be easier to use absolute paths (aka: root relative) from index.html
/css/main.css
Alternatively: putting / at the front of the url will take you to the root level automatically. So /css is a perfectly valid means to get to your css directory regardless of depth of file.
…/…/css/main.css hit the spot
Man I have soo much to learn, Thank you soo much
<off-topic>
Looks like “two adjacent periods? you meant ellipsis. OK, FIFY.”
</off-topic>
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.