When the user hovers over the element. It increases the font weight. Is it possible to make it so it doesn't move the elements besides it? Right now since the font weight increases, the space int takes increases and so the element gets bigger.
.top-nav {
list-style: none;
margin-top: 50px;
float: right;
margin-right: 30px;
}
.top-nav li {
margin-right: 30px;
display: inline-block;
}
.top-nav li a:link,
.top-nav li a:visited {
font-size: 120%;
padding: 5px 10px;
}
.top-nav li a:hover,
.top-nav li a:active {
background-color: #1BA39C;
font-weight: 700;
overflow-x: hidden;
}
<nav>
<ul class="top-nav">
<li><a href="#">Kāpēc ProFoto</a>
</li>
<li><a href="#">Portfolio</a>
</li>
<li><a href="#">Par mani</a>
</li>
<li><a href="#">Atsauksmes</a>
</li>
<li><a href="#">Foto plāni</a>
</li>
</ul>
</nav>