For exercise 7b, I understand that the relative path that you enter in the href quotations changes, but what does it change to? For example, if I go into the books directory and go to index.html and add the link to the style sheet, would it show as href="spice_emporium_site/style_sheets/spice_style.css"?
Support Forum » CSS Course
Relative Paths
(9 posts)-
Posted: 3 years #
-
I am having the same problem. I have tried "spice_emporium_site/style_sheets/spice_style.css" as you have done (seems the logical answer) but I can't create a pathway to the target stylesheet which is ultimately supposed to render my HTML document into something more lovely. Anyone got any advice on how I can do this?
Posted: 2 years # -
Maybe try this instead:
href="style_sheets/spice_style.css"
or this
href="../style_sheets/spice_style.css"
This is just my guess as I know nothing about that tutorial and how the files are arranged. Is it one of the paid for ones, or is it a free one that anyone can look at?
Posted: 2 years # -
Cheers Gary,
href="../style_sheets/spice_style.css" did the job. It is the paid for CSS Level 1 tutorial.
I tried many different permutations, but not the dot dot slash. I take it the dot dot slash takes us to the root directory.
Thanks for reducing my stress!
All the best
T
Posted: 2 years # -
The "../" takes you up one level to the directory above the html which isn't always going to be the root.
Just "/" without the dots will always take you to the root.
Posted: 2 years # -
Hi Cary,
Just a little edit. / itself refers to the current directory. ./ takes you to the root directory (but depending on how the server is configured, that may not be the root of the web site).
j
Posted: 2 years # -
You know I had this problem when I done a course on HTML last year, but I had been away so long that I had forgotten. But you guys certainly prevented me from pulling out what little hair I have left, so cheers!
Orrabest,
T
Posted: 2 years # -
Anyone ever use the BASE meta tag?
Posted: 2 years # -
Sometimes I use the base tag for testing purposes.
Posted: 2 years #
Reply
You must log in to post.
