Css File Is Not Loaded
Solution 1:
I figured it out myself:
the problems was the setting.py
file where static folder is defined. I commented out STATIC_ROOT
and it worked. I guess they cannot co-exist.
Solution 2:
I am not the smartest when it comes to HTML but I know a few things. This may not change much but I can tell you how I do my linking.
<link href="css/CSS.css" rel="stylesheet"type"text/css" />
This is all I have done with my files so far, but I haven't ever tried to make a huge one. This works but everything, including the "% Static" I have never added to mine. Again I hope this helps but I don't know if it will change anything.
C:\Users\(User)\Desktop\Web\(ProjectName)\css\CSS
It Depends on where your HTML file is set in your project. Say I have this file structure.
C:\Users\(User)\Desktop\Web\Projects\HTMLProject\CSS\MainCSS\CSS.css
If your CSS file is in the MainCSS folder, but the HTML file is in your HTMLProject file, you would need to do this instead.
<link href="CSS/MainCSS/CSS.css" rel="stylesheet"type"text/css" />
The more subfolders you have the more you need to explain to your computer how to get there.
Post a Comment for "Css File Is Not Loaded"