'How to remove bullets from Unordered list nested in Div's?
I don't see why my code isn't working. I want to remove the bullets on my ul anchors. but "ul {list-style: none;} isn't working.
Here's my code:
<div class="nav-wrapper">
<div class="logo">
<!-- <a href="/">Logo</a> -->
</div>
<div class="main-page-links">
<ul>
<li><a href="">MENU</a></li>
<li><a href="">WEEKLY EVENTS</a></li>
<li><a href="">FILLER</a></li>
<li><a href="">FILLER</a></li>
</ul>
</div>
<div class="gallery">
<img src="" alt="image galleries">
</div>
</div>
And here's the Css:
*{
margin: 0;
padding: 0;
box-sizing: border-box;}
body{
height: 100%;
}
.nav-wrapper{
display: grid;
grid-template-columns: repeat(6, 1);
grid-template-rows: 8;
height: 100px;
width: 900px;}
ul { list-style: none;} /* I thought this would do it */
Solution 1:[1]
maybe your browser is cached, try using ctrl + shift + R on the page you are using, your code is fine here
Solution 2:[2]
I tried list-style: none, no bullets show.
*{
margin: 0;
padding: 0;
box-sizing: border-box;}
body{
height: 100%;
}
.nav-wrapper{
display: grid;
grid-template-columns: repeat(6, 1);
grid-template-rows: 8;
height: 100px;
width: 900px;}
ul { list-style: none;} /* I thought this would do it */
<div class="nav-wrapper">
<div class="logo">
<!-- <a href="/">Logo</a> -->
</div>
<div class="main-page-links">
<ul>
<li><a href="">MENU</a></li>
<li><a href="">WEEKLY EVENTS</a></li>
<li><a href="">FILLER</a></li>
<li><a href="">FILLER</a></li>
</ul>
</div>
<div class="gallery">
<img src="" alt="image galleries">
</div>
</div>
Solution 3:[3]
try executing it with
list-style-type: none;
it should work perfectly.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Hien Nguyen |
| Solution 3 | Otunba Ekpenyong |
