简体   繁体   中英

list-style not removing bullet points

I have an ul with 5 li and links i am trying to create a nav bar with. I am very new to HTML and CSS but have done this on a previous mock project with no issues. But for some reason now that I have switched to atom I cant get this to work and do not understand why. If it helps when I type either list-style or list-style-type the color of the code doesn't change as if I was to code color: red; in the same section where red would change colors. The list-style: none; stays gray. Anyone see what I may have done wrong? Is there a step that I have missed?

index.html

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Fitness Website</title>
  <link rel="stylesheet" href="style.css">
</head>
<body>
<ul>
  <li><a href="#">Home</a></li>
  <li><a href="#">Contact</a></li>
  <li><a href="#">Login</a></li>
  <li><a href="#">Signup</a></li>
  <li><a href="#">Cart</a></li>
  <li><a href="#">Become an Instructor</a></li>
</ul>

style.css

* {
  margin: 0;
  padding: 0;
}

ul {

}

ul li {
list-style: none;
}

ul li a {}

So I found out that when trying to split the style.css tab to the right, I deleted the original which wouldn't allow the style.css sheet I was coding on to make any changes. I copied all of the code, moved to a new project, and boom. Good to go.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM