How do I link my style.css to my base.html in django

/
/
/
12 Views

I’m having trouble trying to connect my style.css files to my base.html. Here are the files:

leads
  -  templates folder
  -  views.py
static
  -  css folder
      - styles.css
  -  images folder
  -  js folder
templates
  -  base.html

the current code in my base.html is:

{% load static %}

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>DJCRM</title>
    <link rel="stylesheet" type="text/css"  href="{% static 'css/styles.css' %}" />
    <link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet">
</head>
<body>
    <div class="max-w-7xl mx-auto">
        {% include "navbar.html" %}
        {% block content %}  
        {% endblock content %}
    </div>
    {% include "scripts.html" %}
</body>
</html>

Do you have any idea how I can link it so I can create style.css for all my templates?

Leave a Comment

Your email address will not be published. Required fields are marked *

This div height required for enabling the sticky sidebar