I attempted to create a navigation bar by using the code below.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css">
</head>
<body class="background">
<ul>
<li>Home</li>
<li>News</li>
<li>Contact</li>
<li>About</li>
</ul>
</body>
</html>
I added the following CSS code to my styles.css file.
body.background {
background-color: #333333;
}
ul {
list-style-type: none;
}
The class background
worked as expected, but the selector for ul
did not. Instead of removing the bullets from the list, it appeared unchanged. Here is how it currently looks:
- Home
- News
- Contact
- About