简体   繁体   中英

am not able to remove my list-style in css

I have a nav menu that contain several list items. However, I have not been successful at removing the list item styling using CSS.

Here is my code so far:

 .links { overflow:auto; } .lnk { list-style:none; padding:0; margin:0; background:#111111; } .lnk li { float:left; } 
 <div class="links"> <ul class="lnk"> <li><a href="index.html">Home</a></li> <li><a href="index.html">Home</a></li> <li><a href="index.html">Home</a></li> <li><a href="index.html">Home</a></li> <li><a href="index.html">Home</a></li> </ul> </div> 

Unfortunately, none of what I'm trying is working for me. I don't know what else to do. None of my CSS code is even working. They are external files and I have linked them to my page, but they are still not working. Please, I need help.

um I think it might work like this?

.links {
     overflow:auto;
}
.lnk {
     list-style:none;
     padding:0;
     margin:0;
     background-color:#111;
}

li .lnk{
       float:left;
}

I don't know your HTML code so I don't know the problem. Can you post that too? And please explain what your problem is clearer. Oh and I also organized it. I think the problem is that you put .lnk lk instead of li .lnk . There is a difference.

This will helpful for you

<div id="wrapper">
<ul>
  <li>First</li>
  <li>Second</li>
  <li>Third</li>
</ul>
<p>Some text goes here</p>
</div>
css part:
div#wrapper ul {
list-style-type: none;
}
div#wrapper p {
text-align: center;
}

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