I wanted to move the mouse over the links, they would have a green background and a white word, but only one green part and not the whole background. How do I change my CSS for this, already tried in several ways
nav#menu ul{
list-style: none;
text-transform: uppercase;
position:absolute;
top: -10px;
left: 100px;
}
nav#menu li{
display:inline-block;
background-color:#dddddd;
padding: 10px;
margin: 15px;
transistion: background-color 1s;
}
nav#menu{
display:block;
}
nav#menu li:hover{
background-color:#dddddd;
padding: 10px;
}
nav#menu a {
color:black;
}
nav#menu a:hover {
color:white;
background-color:green;
text-decoration:underline;
}
<html>
<head>
<title>ENEM</title>
<link rel="stylesheet" type="text/css" href="css1.css">
</head>
<body>
<nav id="menu">
<ul>
<li><a href="home.html">HOME</a></li>
<li><a href="enem.html">ENEM</a></li>
<li><a href="inscricoes.html">INSCRICOES</a></li>
<li><a href="preparacao.html">PREPARACAO</a></li>
</ul>
</nav>
</body>
</html>