Issue
I am making an app with Spring Boot.
I have a Thymeleaf view chat.html
in resources/templates/chat.html
I include style.css
stylesheet in it.
When I load the chat.html in browser only html shows without any stylesheet.
<html xmlns:th="http://www.thymeleaf.org">
<head>
<link href="styles/style.css" rel="stylesheet">
<title>Chat Web App</title>
</head>
...some irrelevant html ...
<body>
</body>
</html>
I have put the style.css in resources/static/styles/style.css
as per several other answers for same problem but no bueno. Perhaps some additional configuration need to be made or i am simply making a dumb typo.
Solution
The issue was actually in my CSS file :) . Apparently i had selectors for classes that werent present in the html. After removing them the solution proposed in the comments worked fine!
Answered By - Teodor Dyakov
Answer Checked By - Mildred Charles (JavaFixing Admin)