I can't seem to get my link text centered both vertically and horizontally, it keeps aligning to the left. I was under the impression that using flex-based alignments would solve this issue. I have gone through the information on using a flex item as a flex container and it should work, but for some reason, it's not working for me.
.trow {
width: 50%;
display: flex;
min-width: 350px;
}
img {
height: 150px;
float: left;
}
a {
height: 58%;
background-color: #3d7db7;
width: 100%;
}
#box1 {
flex: initial;
}
#box2 {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
text-align:center; /* thanks to answers but vertically not working?*/
}
<div class="trow">
<div id="box1"><img src="images/Image.png"></div>
<div id="box2">
<a href="#">Link here</a>
</div>
</div>