Solution 1 :

it should be <link rel="stylesheet" href="{% static 'css/cool.css'%}"> you forgot to add {% static ''%} there

 {% load static %}
      <link rel="stylesheet" href="{% static 'input.css' %}">
      <link rel="stylesheet" href="{% static 'css/cool.css'%}">   
      <link rel="preconnect" href="https://fonts.gstatic.com">
      <link href="https://fonts.googleapis.com/css2?family=Poppins:[email protected]&display=swap" rel="stylesheet">

Problem :

<!Doctype html>
<html lang="en">
    
  <head>
    <meta charset="utf-8" >
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <meta http-equiv="X-UA-Compatible" content="ie=edge" >
      {% load static %}
      <link rel="stylesheet" href="{% static 'input.css' %}">
      <link rel="stylesheet" href="css/cool.css">
      <link rel="preconnect" href="https://fonts.gstatic.com">
      <link href="https://fonts.googleapis.com/css2?family=Poppins:[email protected]&display=swap" rel="stylesheet">
                                            
    <title>HealthEz</title>
  </head>
    
     <body>
         <h1 class="heading">Create your list</h1>
         
      <div class="form">
        <form action="/addItem/" method="POST">
          {% csrf_token %} <br>
          
          <input type="text" name="name" autocomplete="off" id="foodInput"required> 
        
            <br>
          <input class="button" type="submit" id="add" value="Enter">
          <label for="name" class="label-name" >
              <span class="content-name">Input</span>
          </label>
        </form>
      </div>

      <ul id="Food List">
        {% for list_item in all_items %}
        <li>{{ list_item.content }}</li>
        <form action="/deleteItem/{{list_item.id}}" style="display:inline;" method="POST">{% csrf_token %}
          <input type="submit" value="X">
        </form>
        {% endfor %}
      </ul>
    
  </body>
</html>
-----
CSS


body {
    height: 60vh;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-direction: column;
    font-family: 'Poppins', sans-serif;
    background: aqua;

}

.form{
    width: 50%;
    position: relative;
    height: 50px;
}
.form input{
    width: 100%;
    height: 100%;
    color: black;
    padding-top: 20px;
    border: none;
}

.form label{
    position: absolute;
    bottom: 0px;
    left: 0%;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-bottom: 1px solid black;
}
.form label::after{
    content:"";
    position: absolute;
    left: 0px;
    bottom: -1px;
    height: 100%;
    width: 100%;
    border-bottom: 3px solid aqua;
    transition: all 0.3s ease;
}

.form{
    position: absolute;
    bottom: 5px;
    left: 0px;
    transition: all 0.3s ease;
}

.form input:focus + .label-name .content-name,
.form input:valid + .label-name .content-name{
    transform: translateY(-150%);
    font-size: 14px;
    color: aqua;
}

.form input:focus + .label-name::after, 
.form input:valid + .label-name::after {
    transform:translateX(0%);
}

I am trying to create a form input similar to https://www.youtube.com/watch?v=IxRJ8vplzAo and I can not figure out why I can not do it. Im very new and was wondering if someone could help guide me, please? I have tried creating separate divs and etc but can not get it to work. Thank you for any help.

By