0
I wanted that when you hover the mouse over the links they have a green background and the white word, but only a green part is left and not the whole background. How do I change my CSS to this, I’ve tried it in many 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>
thank you I will mark your reply as the best
– user92870