I created a project for practice where it uses laravel 11 and tailwind css and preline js. I have a problem where my css style is not read when the website is deployed. how do I solve this?
No idea.
Provide more info.
What is your website?
To be able to help you with any issue:
- Submit your support questions to the Hosting Support category, not the Informal category (where the topic template specifically says it’s not for support requests). I moved your topic, but please choose the appropriate category next time.
- When you ask for help with a website, please always share the URL to that website so we can see the issue for ourselves.
As for this particular issue, could you please:
- Share the URL to the CSS files that you use in your page but don’t work.
- Share a screenshot of the file manager showing the list of files in the directory where the CSS files have been uploaded (where the CSS file should be visible, of course). Please make sure that the path you’ve taken a screenshot of is visible, but make sure to hide your browser’s address bar.
- Share which method you used to setup Laravel on our hosting. Out of the box, Laravel says that the server should be configured to load files from the
public
folder, which is not possible on our hosting. There are a few different ways around this, and which approach you took affects where/how CSS files should be loaded.
We’re happy to help you with this, but we need a lot more information than “CSS does not load” to help you.
here’s my website http://musicstudios.lovestoblog.com/?i=1
If you want help, reply to all the questions Admin asked, not just the ones you want to answer.
And
Thanks for the additional information.
In the page source, I can see your page tries to load the stylesheets from https://musicstudios.lovestoblog.com/build/assets/app-Bd2nSrj2.css
.
Can you please check the directory htdocs/build/assets/
and check that it contains the file app-Bd2nSrj2.css
?
No, it isn’t. The file in there has a suffix that ends with AV3
. The file used on your website has a suffix that ends with rj2
. The file names are different. So the file that the website requests is not there.
Then you need to make sure that your website also uses that new file name. Because right now, it doesn’t.
I assume you’re using Laravel Vite? Then you must make sure that the build/manifest.json
file matches the assets themselves.