htmlcsslistbullet

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

  • Maybe your browser is cached, try using control+shift+R on the page you are using, your code is fine here

    *{
    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;}
    <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>