Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

MakesYouFurious's avatar

My CSS is not working

just started learning how to use laravel, and the css for the site just does not want to work, it said that "Failed to load resource: the server responded with a status of 404 (Not Found)"

this is how i use the css in my php file

the style is css is currently in myproject/resources/css/style.css

Can anyone help?

1 like
6 replies
MakesYouFurious's avatar

SO i've figured it out, turns out im using something called vite? and then i just put import ./style.css and then did an npm install dan an npm run dev and it work. im so stupid

jlrdw's avatar

im so stupid

No you are not, we were all new to this at one time.

1 like
srushti_kansagara's avatar

isn't it would be better to put your style.css file in the public folder ?

( of course if you are not using vite or anything like that )

1 like
MakesYouFurious's avatar

@srushti_kansagara yeah i read up on it quite a bit, and found out, that i should've put it there. I need to do a lot of reading it seems, my university teacher didnt explain anything about laravel, and he suddenly gave us the assignment to make a website using laravel. thanks by the way

Please or to participate in this conversation.