Having trouble achieving a hover effect and could use some help.
I'm working on creating a tab-style navigation menu where I want the tab to expand from the top when hovered over. However, my current CSS code is causing the tab to expand both at the top and bottom, also moving the parent element. Can someone assist me in adjusting the code so that it only expands at the top of the menu item without affecting the parent? Thanks in advance!
.nav-1 ul li {
display: inline-block;
margin: 0px;
padding: 0px;
}
.nav-1 ul li a {
transition: 0.5s;
padding:16px 22px;
font-size: 18px;
color: #fff;
display: block;
font-weight: 400;
}
.nav-1 ul li a:hover {
transition: 0.5s;
padding:22px 22px 26px 22px;
}