0

Where should I put my css file if I have only one file (style.css) ?

I use sass for my project and I convert all my sass files to only one css file.

But I don't know where I have to put this file.. because normally I would create a static folder for each app but I think that makes no sense if I have only one file...

Jak111
  • 119
  • 1
  • 3
  • 13
  • Usually at the root of the site, linked as ` – Michael Coker Apr 02 '17 at 19:45
  • You mean I should create a static folder in my project folder and put there my css file ? – Jak111 Apr 02 '17 at 19:48
  • I configure my server to serve static files if they exist in the project dir, so I just add style.css at the root of my project and it's served from there. You can create a dir if you want. There is an example here https://docs.djangoproject.com/en/1.10/intro/tutorial06/ – Michael Coker Apr 02 '17 at 20:05
  • http://stackoverflow.com/questions/9145994/django-and-css-and-a-really-simple-example-please – Michael Coker Apr 02 '17 at 20:06

1 Answers1

1

You just need to put the CSS file somewhere and tell HTML were to find using the link tag. For example, if the file is in the folder "style" the tag will be.

<link rel="stylesheet" href="/style/file.css" />

Usually the main css style fail was in the root folder or in a style folder.