How to add a stylesheet to IntelliJ?
Hi, I'm new in IntelliJ and I'm trying to add a simple css file to my web project, but it's not detected nor rendered.
What can I do to solve it?
Attachment(s):
Sin título.png
Please sign in to leave a comment.
Hi, I'm new in IntelliJ and I'm trying to add a simple css file to my web project, but it's not detected nor rendered.
What can I do to solve it?
Please sign in to leave a comment.
It looks like you have the "resources" directory marked as a "Web Resource" in the module's Web facet configuration. A "Web Resource" is a root of a web application, and not an additional resource for one. So IDEA is configured to have two webapps, one with its root in the "web" directory and one with its root in the "resources" directory. I suspect that that is not your intent (i.e. to have two webapps). You will want to move the "resources" directory so it is a subdirectory of the "web" directory. That should solve the issue. (You'll also want to remove the "resources" directory as a Web Resource in the facet configuration for your module.)
Hi, I moved the css folder into the web folder and deleted the resources one, but now it's trying to download the css from this url:
and of course the css file is not found on that url.