I'm interested in creating a hover effect where a line appears above my text when hovering over it. The twist is, I want the hover line to match the length of each individual text. This effect will be applied to the navigation section of my HTML.
Here's my HTML code:
<!DOCTYPE html>
<html>
<head>
[…]
</head>
<body>
<div class="navigation">
<nav>
<ul>
<li><a href="#">Art of Gifting</a></li>
<li><a href="#">Fashion</a></li>
[…]
</ul>
</nav>
</div>
[…]
</body>
<footer>
[…]
</footer>
</html>
And here's my CSS:
h1 {
font-family: 'Satisfy', cursive;
font-size: 70px;
text-align: center;
}
.navigation ul{
font-family: 'Tajawal', sans-serif;
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
text-align: center;
}
[…]