I have the next structure of the project folder:
# A needed clarification. The output you see below is not the whole project,
# it's just a necessary part that needs to be shown.
.
├── 1_introduction
│ └── ...
├── 2_growing_and_shrinking
│ ├── css-tricks_lesson
│ │ └── ...
│ ├── theory.txt
│ └── TOP_lesson
│ ├── flex-basis
│ │ └── index.html
│ ├── flex-grow
│ │ └── index.html
│ └── flex-shrink
│ └── index.html
├── 3_axes
│ └── ...
├── 4_alignment
│ └──...
└── common-styles.css
Now I want to link common-styles.css
to all the index.html
.
That's how my current solution looks like, but using triple double dots to go back and link styles don't look good:
<link rel="stylesheet" href="../../../common-styles.css">
So I also tried to use the absolute(in relation to the main/initial project folder) path like the VSCode suggests when I type /
in the href=""
, but it doesn't work at all:
<link rel="stylesheet" href="/foundations/3_flexbox/common-styles.css">
I surely tried to find an answer, but all the similar posts about 'linking CSS to HTML suggest using what I just used: two dots to go to the parent directory one level above.
So the second option does not work somehow, even though it was a suggestion by the VSCode. Do I need to configure something in there?
If it's not a problem with the code editor, how to make it work without writing the whole path from /home/myuser/.../common-styles.css
and without using multiple stepbacks?