I have a container with a height: 246px, I then have a div with text inside which I want to center vertically and horizontally in the div and also in this container.
The desired result should look like this Navy row
My code currently looks like this:
html
<section id="rowsec">
<div class="colwrap">
<span class="layer">41%</span>
<span class="stat">Company average cost saving versus originator brands on the South African market</span>
<span class="layer">10+</span>
<span class="stat">Company has 10 market leading brands within the family of products</span>
</div>
</section>
CSS
#rowsec {
height: 246px;
width: 100%;
background-color: #0c225f;
}
/* Clears floats after the columns */
#rowsec:after {
content: "";
display: table;
clear: both;
}
.colwrap{
width: 80%;
margin: auto;
}
.layer {
font-family: 'HKGroteskMedium';
font-size: 75px;
font-weight: 500;
line-height: 1.2;
color: #9fb8ff;
}
.stat {
padding-left: 35px;
font-weight: 500;
font-style: normal;
font-stretch: normal;
line-height: 1.45;
color: #ffffff;
max-width: 412px;
}
.colwrap a{
float: left;
}