By TiggaBiscuit
Hey Team,
I’ve just started using Digital Ocean and have used the ‘Apps’ function to host my website from a GitHub repo. It deployed successfully, however when the style.css file is located in CSS folder it doesn’t load, however if I move the style.css file to the root folder it loads normally.
When looking in the sources tab of the inspect element it’s showing that the CSS folder isn’t loading at all.
My portfolio website is https://danagnew.co.nz
Any help or advice around this would be amazing!
Cheers, Dan Agnew
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hey Dan,
First off, congrats on getting your portfolio website up and running with DigitalOcean’s App Platform! It’s great that you’ve successfully deployed your site! Let’s try and troubleshoot the CSS issue, here are the first things that I would recommend checking:
Double-check the path to your CSS files in your HTML. If your CSS files are in a CSS folder, the link in your HTML should look something like this:
<link rel="stylesheet" href="/css/style.css">
Make sure the path correctly reflects the folder structure in your GitHub repo.
Paths on servers are often case-sensitive. If your folder is named CSS but your HTML is referencing css, it won’t find the files. Ensure that the case matches exactly.
Use your browser’s developer tools to check the network requests for your CSS files. This can give you clues as to whether the files are not found (404 errors) or if there’s another issue.
In the DigitalOcean App Platform, check your build and publish settings. Make sure that the publish directory is set correctly to include your CSS folder. Sometimes, if the publish directory is set to the root, it may not include subdirectories by default.
Verify that your GitHub repository’s structure is as you expect and that the CSS folder is not in a .gitignore file or excluded in some other way.
If you’re using relative paths, try switching to absolute paths (or vice versa) to see if that resolves the issue. Sometimes path resolution can behave differently in a deployed environment versus a local environment.
After making changes, re-deploy your app. Sometimes, a simple re-deployment can fix path issues.
Best of luck, Dan! Let me know how it goes!
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.