Ask coding questions

← Back to all posts
CSS won't link to HTML
illini-mc

I created a new HTML/CSS/JS replit this afternoon and was stuck for a while trying to get a background-image attribute to load. I eventually realized that it was not just the background-image attribute, but the entire CSS file. I am able to style some CSS (not the background-image) from the html file, but still nothing from within the style.css file itself.

What am I missing? Thank you!

Voters
illini-mc
Comments
hotnewtop
Hyderite

do you mean the css wont load in 404.html? because you forgot to add <link href="style.css" rel="stylesheet" type="text/css" /> to the file, so that it cant "fetch" the code in style.css.

Hyderite

and apparently, the website wont load, it just says "Not Found"

illini-mc

@Hyderite appreciate the reply. I should have specified in my post, but I am referring to about.html. I'm very confused why the css does not work given that the repl.it was started as a html/css/js template (which comes with style.css connected right out of the box).

Hyderite

@illini-mc but this file doesn't exist.

QuickV

Can't see the repl :eyes:

illini-mc

@QuickV Huh, any idea why? Only thing I can think of off the top of my head is repl.it doesn't like that I am running an express server on an html/css/js repl?

QuickV

Replit is kinda funky on my computer, does it work on your end? @illini-mc

illini-mc

@QuickV Nope, doesn't work my either...

QuickV

oh ok :(

@illini-mc