I'm currently practicing by creating simple websites, whenever I hover on the text it moves a little bit and I do not want that. I made it so that whenever I hover over it a border appears. I used display:flex maybe that is the problem I don't really know. If there is any better way to do it, please drop it down. Much appreciated.
Here is my code
body {
font-family: Roboto, Arial;
margin: 0px;
}
.nav-bar {
display: flex;
font-size: 20px;
justify-content: space-evenly;
align-items: center;
background-color: rgb(242, 242, 242);
height: 50px;
}
.button-nav {
padding: 5px 5px 5px 5px;
cursor: pointer;
border-radius: 5px;
transition: border 0.25s;
}
.button-nav:hover {
border: 2px solid black;
}
<nav class="nav-bar">
<nav class="button-nav">Skills</nav>
<nav class="button-nav">Hobbies</nav>
<nav class="button-nav">School</nav>
<nav class="button-nav">Career</nav>
</nav>