I'm struggling to perfectly align the text in the middle of the li container. It seems to be centered horizontally, but vertically it's off.
I've attempted adding a span to the text and adjusting the margin and padding, but so far I've had no luck in getting the text to move.
My goal is to have the text centered both horizontally and vertically in the middle of the blue box. Currently, it's centered left to right, but not top to bottom.
<html>
<style>
.follow-button {
height: 40px;
width: 100px;
background: #0081F2;
border: #0081F2;
color: #fff;
font-weight: bold;
text-align: center;
margin: 0;
padding: 0;
}
.follow-button:hover {
cursor: pointer;
background: #0059D0;
border-color: #0059D0;
}
#follow-button-nav {
list-style: none;
margin-left: 0;
padding-left: 0;
}
</style>
<ul id="follow-button-nav">
<li class="follow-button">Follow</li>
</ul>
</html>