Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

Move your template folder right under resources:

src/main/resources/static/css (for CSS files); src/main/resources/templates (for HTML templates). 
src/main/resources/static/css (for CSS files); src/main/resources/templates (for HTML templates). 

Then correct the link tag as follows (relative or absolute):

<link href="../css/firstcss.css" rel="stylesheet"> <link href="/css/secondcss.css" rel="stylesheet"> 
<link href="../css/firstcss.css" rel="stylesheet"> <link href="/css/secondcss.css" rel="stylesheet"> 

The old solution with static in front doesn't work for me.

Move your template folder right under resources:

src/main/resources/static/css (for CSS files); src/main/resources/templates (for HTML templates). 

Then correct the link tag as follows (relative or absolute):

<link href="../css/firstcss.css" rel="stylesheet"> <link href="/css/secondcss.css" rel="stylesheet"> 

The old solution with static in front doesn't work for me.

Move your template folder right under resources:

src/main/resources/static/css (for CSS files); src/main/resources/templates (for HTML templates). 

Then correct the link tag as follows (relative or absolute):

<link href="../css/firstcss.css" rel="stylesheet"> <link href="/css/secondcss.css" rel="stylesheet"> 

The old solution with static in front doesn't work for me.

Source Link
Adrian
  • 515
  • 1
  • 7
  • 20

Move your template folder right under resources:

src/main/resources/static/css (for CSS files); src/main/resources/templates (for HTML templates). 

Then correct the link tag as follows (relative or absolute):

<link href="../css/firstcss.css" rel="stylesheet"> <link href="/css/secondcss.css" rel="stylesheet"> 

The old solution with static in front doesn't work for me.