Answer the question
In order to leave comments, you need to log in
Why does the .html page stop seeing style.css?
In a spring application, the .html start page handles the tag
<link href="css/style.css" type="text/css" rel="stylesheet"/>.
But after performing the operations: <a th:href="@{/anylink})}"</a>
return "redirect:" + url;
<link href="..."/>
<link rel="stylesheet" href="css/bootstrap.min.css"/>
and other inconveniences. Answer the question
In order to leave comments, you need to log in
It's early for you in Spring, very early. You do not distinguish relative links from absolute ones, and these are the basics known to any layout designer.
I recommend reading the thymeleaf documentation.
Make sure the css file is in resources/static/css/style.css
You are connecting the styles incorrectly.
<link href="css/style.css" type="text/css" rel="stylesheet"/>.
<link th:href="@{/css/style.css}" type="text/css" rel="stylesheet"/>.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question