I'm learning HTML and CSS, I have searched this question but I didn't find a solution which worked for me.
So in my navigation bar, when the user hovers their mouse over a piece of text the size increases but also moves the other pieces of text. I want the size to increase but not move the other pieces of text.
MY WEBSITE
.nav {
margin-top: 0px;
height: 40px;
width: 600px;
background: white;
}
.nav ul {
display: inline-block;
margin: 0;
padding: 0;
}
.nav ul li {
list-style: none;
display: inline;
}
.nav ul li a {
text-decoration: none;
float: left;
display: block;
padding: 10px 20px;
color: black;
font-family: ProximaNova;
font-size: 18px;
}
.nav ul li a:hover {
color: #D46300;
font-size: 22px;
}
<div class="nav">
<ul>
<li><a href="news.html">News</a></li>
<li><a href="servers.html">Servers</a></li>
<li><a href="donate.html">Donate</a></li>
<li><a href="bans.html">Bans</a></li>
<li><a href="support.html">Support</a></li>
</ul>
</div>