Example:
* {
margin: 0;
box-sizing: border-box;
}
.row{
width: 100%;
height: 90px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 0 50px;
background-color: grey;
}
a{
background-color: black;
color: white;
width: 8rem;
text-align: center;
line-height: 40px;
}
<div class="row">
<p>Other content</p>
<a>Test Button</a>
</div>
<a>Test Button</a>
As you can see, the style of the two anchor tags are not the same. Inside the flex container, the link has the desired width and line-height, but outside it only changes its background color. I guess that has something to do with the container, but I can't tell what. Why is that happening?