Tại sao khi thu nhỏ web lại thì phần background-color nó không bao hết phần menu nhỉ? Em cảm ơn
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./Grid/grid.css">
<link rel="stylesheet" href="./projectforus/assets/css/fonts/fontawesome-free-6.5.2-web/css/all.min.css">
<title>Document</title>
</head>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: sans-serif;
}
html{
height: 100%;
width: 100%;
background: #3498db;
}
nav{
background-size: cover;
font-size: 40px;
padding: 10px 30px;
display: flex;
align-items: center;
justify-content: space-between;
background: #004274;
position: relative;
height: 100px;
left: 0;
right: 0;
}
.logo{
color: #fff;
}
nav ul{
display: flex;
gap: 30px;
align-items: center;
}
nav ul li{
list-style-type: none;
}
nav ul li a{
text-decoration: none;
color: #fff;
}
.menu-icon{
display: none;
}
.menu-icon i{
color: #fff;
font-size: 30px;
}
@media (max-width:600px) {
nav ul{
position: absolute;
top: 70px;
left: 0;
right: 0;
flex-direction: column;
text-align: center;
background: #004274;
gap: 0;
overflow: hidden;
}
nav ul li{
padding: 20px;
padding-top: 0;
}
.menu-icon{
display: block;
}
#menuList{
transition: all 0.5s;
}
}
</style>
<body>
<nav>
<div class="logo">
Logo
</div>
<div class="menubar">
<ul>
<li class=""><a href="">Home</a></li>
<li class=""><a href="">About</a></li>
<li class=""><a href="">Services</a></li>
<li class=""><a href="">Product</a></li>
<li class=""><a href="">Contact</a></li>
</ul>
</div>
<i class="icon fa-solid fa-bars"></i>
</nav>
<script>
function myfunction(){
}
</script>
</body>
</html>