Issue
I am using Windows 7 trying to create an offline HTML page that should link to a separate CSS file located in same directory. I tried to use
<link rel="stylesheet" type="text/css" href="/styles.css" />
but no luck.
And I also want to import another CSS file named styles2.css within style.css. Didn't check yet but putting @import "style2.css";
on style.css may be not work as well. I can use absolute links like C:\Users\ELITEBOOK\Desktop\offline\style.css
but it won't work if I move the folder anywhere else from Desktop. Is there any code that calls/adds the link of the folder?
Solution
Use <link rel="stylesheet" type="text/css" href="./styles.css" />
instead. Note: href="/styles.css"
changed to href="./styles.css"
, which is current directory of your script.
Answered By - Damilola Olowookere
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.