I wanted to create a button component in React, but I have found that there is a small space between my anchor tag and the container element. I tried zooming in and out to see if that was the issue but I did not find a difference. The example below shows the problem.
.container {
display: inline-block;
margin: auto;
text-align: center;
border: 1px solid white;
}
.link {
display: block;
padding: 1.2rem 2rem;
color: white;
background-color: black;
letter-spacing: 3px;
transition: all 0.5s;
}
.container:hover {
cursor: pointer;
border: 2px solid red;
}
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<div class="container">
<a class="link">FOO</a>
</div>
</body>
</html>