I am currently trying to make a webpage but I can't tell why my html can't see the css file provided. I have an application in SpringBoot. I have the following files: index.html
<!DOCTYPE html>
<html lang="en">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Menu</title>
<link href="../static/style.css" th:href="@{/style.css}" rel="stylesheet" />
</head>
<body>
<nav>
<ul>
<li><a href="#"> View</a></li>
<li><a href="#"> Notify </a></li>
<li><a href="#"> A</a></li>
<li><a href="#"> B</a></li>
</ul>
</nav>
</body>
</html>
style.css
* {
margin: 0;
padding: 0;
}
ul {
}
ul li {
list-style: none;
display: inline-block;
float: left;
}
ul li a {
text-decoration: none;
font-size:14px;
font-family: arial;
color: #1e1e1e;
}
Structure of project:
Tried changing the root to the css file multiple times and tried even without thymeleaf however it doesn't work . Any help would be great. The html file works however the css file is not applied to it.