So I am trying to create navigation bar to my django template but I can't make any css adjustments. Django doesn't throw any error messages...
{% load static %}
<head>
<link rel='stylesheet' type='varaustiedot/styles.css' href="{% static 'style.css' %}"/>
<title>Varaus</title> <! Varaus = Reserve>
</head>
<body>
<div class="topnav">
<!>
<!a class="active" href="home"><!/a>
<a href="register">Varaa</a>
<a href="#">Yhteystiedot</a>
<a href="#">Tietoa meistä</a>
</div>
</body>
Here is my css file
html,
body{
font-size: 15px;
background-color: #1f2029;
}
.osoite{
margin: auto;
width: 50%;
text-align: center;
}
.centered-form {
text-align: center;
}
.topnav{
text-align: right;
margin-top: 20px;
margin-bottom: 40px;
padding: 20px;
background-color: black;
}
I tried to google the answer and I even asked chatbotGPT. So far I haven't found any issues. I have changed class names and all the names I could think of.
I had
?{% now "U" %}
when i did that link at first. But it didn't seem to do anything and every time I refreshed the site and had done some changes to css code (I checked with control + u) it had been updated...
I am not sure if there is some sort of typo or something like that but usual
?{% now "U" %}
fix didn't seem to work for me. I can try it again if it makes any difference but so far nothing.
type='varaustiedot/styles.css'in your stylesheet tag? Probably should remove this attributetype='varaustiedot/styles.css'and check if browser could find the css file, if still not working, please share your outputted page source