I have a banner that has an image on the left and text on the right but the text is not going to the middle of the right section even though I put text-align: center;.
Code
<div class="box1">
<img src="\jwcodeme\assets\ban_1_img.jpg" width="50%" style="float: left;" alt="coding img unavailable or failed to load">
<span>
<h1>Coding</h1>
</span>
</div>
Instead of text-align: center; you should use margin: auto
.box1 {
background-color: #FC6A03;
font-family: 'Courier New', Courier, monospace;
display: flex;
align-items: center;
}
.box1 span {
display: flex;
margin: auto;
margin-top: 0; <!--- If you want it at the top of the page.-->
}