In general, for basic button no need to use flexbox.
For horizontally align change the display from display: inline
(default value) to display block
and add text-align center.
a{
display: block;
text-align: center;
background: lightgray;
}
<a class="navigation-item__link" href="/auth">Login</a>
Sometimes you want to align inline-block
buttons - the most simple way to do this is by extra text-align:center
wrapper.
a{
display: inline-block;
padding: 10px 15px;
background: lightgray;
line-height: 1;
}
.align-center{
text-align: center;
}
<div class="align-center">
<a class="navigation-item__link" href="/auth">Log in</a>
<a class="navigation-item__link" href="/auth">Sing up</a>
<br><br>
<a style="display: block;" class="navigation-item__link" href="/auth">Back</a>
</div>
For V-align - use padding-top/bottom (Easier to manage space like this and not by flexbox or height/min-height):
https://www.w3schools.com/css/css3_buttons.asp
a{
display: block;
text-align: center;
background: lightgray;
padding: 10px 15px;
}
<a class="navigation-item__link" href="/auth">Login</a>
If you want to align the button to some "card" flexbox is very useful.
a{
display: block;
text-align: center;
background: lightgray;
padding: 10px 25px;
}
.flex-align-v-h{
min-height: 100vh;
background: gray;
display: flex;
align-items: center;
justify-content: center;
}
h1{
text-align: center;
}
<section class="flex-align-v-h">
<div>
<h1>Hello</h1>
<a class="navigation-item__link" href="/auth">Login</a>
</div>
</section>
If the text does not align to the button inspect element (Maybe your styles inherit extra top/bottom margin/padding).