CSS based Navbar not displaying in full width

The following is a screenshot followed by the CSS code for the navbar. The navbar is not adjusted to its full width and can be seen taking some margin from the right and left borders of the webpage. I am not being able to figure this out. Any help is appreciated.

.navbar{
    background-color : #222;    
    font-family : gt-super, Georgia, Cambria, "Times New Roman", Times, serif;  
    font-size : 20px; 
    color : #fff; 
    border-bottom: 1px solid #000;
    display : flex;
    justify-content : space-around;
    align-items: center; 
}

.nav-list {
    list-style: none;
}

.nav-list li{
    display: inline-block;
    padding: 20px 10px;    
}

.navbar a{
    text-decoration: none;
    color : #fff;
}

.nav-list a:hover{
    color: #00FFD5;
}

.menu{
    display: none;
}

.menu-line {
    width: 20px;
    height: 3px;
    background-color: white;
    margin-bottom: 4px;
}

.dropdown {
     display: none;
     position: absolute;
     width: 150px;
 }

 .dropdown li{
     display: block;       
 }

 .nav-list li:hover > ul {
     display: block;
     background-color: #161624;
 }

@media all and (max-width: 720px) {
    .navbar{
        flex-direction: column;
        padding-top: 10px;
    }
    .nav-list{
        padding-top: 5px;
        display: none;
    }
    .nav-list li{
        display:block;
        padding:10px;
        text-align: center;
    }
    .menu{
        display: block;
        position: absolute;
        right:15px;
        top:20px;
    }    
    .active{
        display: block;
    }
    .title{
        padding-bottom: 10px;  
    }
}

Hey! Try setting navbar’s width to 100% :wink:

.navbar {
  width: 100%;
}

and maybe also resetting CSS, like so:

* {
  margin: 0;
  padding: 0;
  //box-sizing: border-box; //if applicable to your design
}
1 Like

Hey Tori thanks… it worked like a wonder. Many many thanks. :innocent:

1 Like

not at all! and btw, you design looks nice! good luck!

1 Like

Thanks for boosting my confidence… :smiley:

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.