Reputation: 13
Why doesn't XAMPP write the path to css?
Path: htdocs/my_project/index.html - this is my file
Path: htdocs/my_project/css/demo.css - this is my file of style
This does not work:
<link rel=“stylesheet” href=”css/demo.css” type=“text/css”>
If I transfer my css file in main directory (htdocs/my_project) and change link to css file to:
<link rel=“stylesheet” href=”demo.css” type=“text/css”>
then it does work.
Upvotes: 1
Views: 1144
Reputation: 36
Try this to see if Xampp will go back one directory
<link rel=“stylesheet” href=”/css/demo.css” type=“text/css”>
OR
<link rel=“stylesheet” href=”../css/demo.css” type=“text/css”>
Upvotes: 2