Hey there! I'm new to Django and I'm struggling to get my css to display properly. I'm trying to create a red notification, similar to Facebook, for my unread messages. But for some reason, my css isn't rendering. Can anyone point out what I might be doing wrong? Here's the code snippet:
settings.py/Static_Dir
STATIC_URL = '/static/'
STATICFILES_DIRS = [
"/DatingAppCustom/dating_app/static",
]
notification.css
.btn {
width:100px;
position:relative;
line-height:50px;
}
.notification {
position:absolute;
right:-7px;
top:-7px;
background-color:red;
line-height:20px;
width:20px;
height:20px;
border-radius:10px;
}
base.html/notification section
<link href="{% static 'notification.css' %}">
<button class="btn">message counter
<div class="notification">{% unread_messages request.user %}</div>
</button>
EDIT, adding directory path
.
├── 11_env
│ ├── bin
│ ├── include
│ ├── lib
│ └── pyvenv.cfg
├── dating_app
│ ├── __init__.py
│ ├── admin.py
│ ├── apps.py
│ ├── forms.py
│ ├── migrations
│ ├── models.py
│ ├── static
│ ├── tag.py
│ ├── templates
│ ├── templatetags
│ ├── tests.py
│ ├── urls.py
│ ├── views.py
├── dating_project
│ ├── __init__.py
│ ├── asgi.py
│ ├── settings.py
│ ├── urls.py
│ ├── wsgi.py
├── db.sqlite3
└── manage.py