I am currently working on making my navigation bar elements larger when hovered over. However, I'm facing an issue where the rest of the website shifts downward slightly when I mouseover them, and it doesn't look good. Is there a way to increase the text size in the navigation bar without affecting the other elements of the website?
nav {
text-align: center;
margin-top: 20px;
margin-bottom: -4px;
}
.nav{
text-decoration: none;
color: black;
text-transform: uppercase;
font-weight: 600;
padding: 5px;
font-family: calibri;
padding-top: 2px;
transition-property: all;
transition-duration: 500ms;
}
.nav:hover {
font-size: 130%;
opacity: 0.6;
}
.LLHashtag {
width: 370px;
margin: 0 auto;
text-align: center;
text-decoration: none;
margin-top: 5px;
font-size: 50px;
text-transform: uppercase;
font-weight: 600;
color: black;
border-top: solid black 2px;
font-family: "helvetica Neue";
font-weight: 400;
}
<nav>
<a class="nav" href="http://www.google.de">Home</a>
<a class="nav" href="http://www.google.de">Über</a>
<a class="nav" href="http://www.google.de">Motivation</a>
<a class="nav" href="http://www.google.de">Kontakt</a>
<a class="nav" href="http://www.google.de">Impressum</a>
</nav>
<h1 class="LLHashtag">#LifeLetics</h1>