I have the following header in my website, I want to center the text both horizontally and vertically. I am using class 'text-center' in bootstrap 4. It works, however, it centers it in the space after the logo. I want the text to to be centered relative to the header as a whole. The following is the HTML and css code for the header.
.header {
width: 100%;
height: 100%;
padding: 0px;
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
padding-top: 0px;
background-color: #5186a7;
overflow: hidden;
}
.logo {
display: block;
float: right;
padding-top: 10px;
padding-bottom: 10px;
padding-right: 5px;
padding-left: 5px;
}
<div class="header-sec">
<div class="header">
<a href="visitor_home.php">
<img src="images/header_logo.png" alt="Logo" class="logo">
</a>
<h1 class="text-center"style="color:white;"><strong>خــدمـــة الــدراســات والأبــحــاث</strong></h1>
<div class="clr"></div>
</div>