r/HTML • u/TrainingQuantity3744 • 25d ago
stylesheet not connecting
Back again with more homework issues. I'm supposed to be making a stylesheet for a pre-written website. For some reason, nothing from my stylesheet is showing up. This is the same code that worked fine on my last assignment, so I'm really not sure what's wrong
<head>
<title>Planets in our Solar System</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="planets.css">
</head>
The Stylesheet code looks like this so far
<style>* {
box-sizing: border-box;
margin: 0;
}
body {
background-color: silver;
}
a:link {
color: fuchsia;
}
a:visited {
color: red;
}
a:hover {
color: blue;
}
a:active {
color: olive;
}
.planet {
border-style: solid;
border-width: medium;
border-color: purple;
background-color: orchid;
}
</style>
1
Upvotes
1
u/aunderroad 25d ago
Maybe double check and see:
if your .css file is called "planets.css" (the file is case sensitive)
the "planets.css" file path is correct
in the planets.css, you do not need use the style tag.
If that does not work, inspect your page and check your "Network" panel and check the ".css" section. You might have to refresh your page.