Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to load resource 404 style.css firebase

Receiving the following console log from my static website

Failed to load resource: the server responded with a status of 404 ()

on style.css

Project structure

root - home.html folder inside root - styles file inside 'styles' folder - style.css

(It's a simple website, for testing firebase)

I've used firebase to create the instance of my website and it outputted my html to a public folder with index.html but no css files.

Like so public/index.html

I've added inline css to account for this by using <style media="screen"> and it works but it's still not reading/finding my style.css file

style.css link inside index.html (firebase created)

<link rel="stylesheet" type="text/css" href="../style/style.css">

Looked into other answers but they're using bootstrap supplied cdn/url. I want to be able to use the one I created.

like image 691
cala Avatar asked Mar 22 '26 01:03

cala


1 Answers

Firebase hosting will only host the files under your public folder. Which means that your style folder is not being uploaded and thus index.html can't detect the css file.

You need to move your style folder to have it inside the public folder and change the link to:

<link rel="stylesheet" type="text/css" href="style/style.css">
like image 192
Rosário Pereira Fernandes Avatar answered Mar 24 '26 18:03

Rosário Pereira Fernandes



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!