CSS won't load?

Hello,

The problem is that I have a project that includes Java, Spring Boot, ReactJS, CSS, JS, and RestAPI. My only problem is that when I load the page: localhost:8080/login.html, the HTML displays the contents of the HTML file but doesn't include the CSS file at all. The paths to the individual files are also correct, as they are linked, but styling via CSS doesn't work.

 login.html: https://codefile.io/f/uD0jP33Wef style.css: https://codefile.io/f/AGN6ENmt6t script.js: https://codefile.io/f/unKOx5NUi6

It would be really great if someone could help me with this.

(3 votes)
Loading...

Similar Posts

Subscribe
Notify of
14 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
EinAlexander
1 year ago

CSS doesn’t want to load?

Try using cache empty or private mode.

Alex

EinAlexander
1 year ago
Reply to  synthax68228

As soon as I enter localhost:8080/static/style.css I also get to the Whitelable error page.

What does the errorlog say?

EinAlexander
1 year ago

Now I come up with localhost:8080/style.css but as soon as I connect it with login.html the complete page is white.

Then take this binding

http://localhost:8080/style.css" rel="stylesheet" type="text/css">
Fischkopf289
1 year ago

It might be that if you want to include the css datei with the following command:

0
regex9
1 year ago
Reply to  Fischkopf289

It could be (…)

The slash at the beginning of the path indicates that it is searched from the root directory.

Fischkopf289
1 year ago
Reply to  regex9

I just tried it, and I didn’t get it

regex9
1 year ago

No, it has nothing to do with it.

Fischkopf289
1 year ago

So it’s got something to do with the ReactJS zeug or the jumping boat, so I haven’t dealt a lot yet mainly with html,css and js

regex9
1 year ago

Then you must have done something wrong.

It is an absolute path. The page must be accessed via a domain and the Static-Ordner must be in the root directory.