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


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

  -  templates folder
  -  css folder
      - styles.css
  -  images folder
  -  js folder
  -  base.html

the current code in my base.html is:

{% load static %}

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