I am doing a group project where we are trying to replicate this website and I have been assigned this section:
I have everything laid out with flexbox but for some reason can't get the text centered for the section on the right. This is what I have got so far:
I tried using justify-content: center
and align-items: center
but nothing happens to the text. How do I align everything in the center?
Here is all my code in a codepen: https://codepen.io/caseycling/pen/VwmExMY
Here is my HTML:
'<body>
<div class="container">
<div class="ten-img">
<h1>10</h1>
</div>
<div class="yrs-exp">
<h2>Years Of Experience</h2>
<p>
DreamSoft is a team of highly experienced app designers and developers
creating unique software for you.
</p>
<button>Get In Touch</button>
</div>
<div class="deats-cont">
<div class="deat" id="deat-1">
<h1>2K</h1>
<p>Apps developed</p>
</div>
<div class="deat" id="deat-2">
<h1>40</h1>
<p>Consultants</p>
</div>
<div class="deat" id="deat-3">
<h1>12</h1>
<p>Awards</p>
</div>
<div class="deat" id="deat-4">
<h1>160</h1>
<p>Employees</p>
</div>
</div>
</div>
<div class="clients">
<a
><img
src="https://ld-wt73.template-help.com/wt_prod-18959/images/clients-9-270x117.png"
alt="mittos"
/></a>
<a
><img
src="https://ld-wt73.template-help.com/wt_prod-18959/images/clients-10-270x117.png"
alt="mittos"
/></a>
<a
><img
src="https://ld-wt73.template-help.com/wt_prod-18959/images/clients-3-270x117.png"
alt="mittos"
/></a>
<a
><img
src="https://ld-wt73.template-help.com/wt_prod-18959/images/clients-11-270x117.png"
alt="mittos"
/></a>
</div>
And here is the CSS:
* {
margin: 0;
}
.container {
margin: 5rem 10rem 2rem;
display: flex;
text-align: center;
justify-content: center;
align-items: center;
}
.ten-img {
font-size: 140px;
}
.yrs-exp {
margin: 1rem;
font-size: large;
flex-basis: 20%;
text-align: start;
}
.yrs-exp p {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
.deats-cont {
display: flex;
flex-wrap: wrap;
}
.deat {
flex-basis: 49%;
min-height: 100px;
}
#deat-1 {
border-right: solid 1px black;
}
#deat-2 {
border-bottom: solid 1px black;
}
#deat-3 {
border-top: solid 1px black;
}
#deat-4 {
border-left: solid 1px black;
}
.clients {
margin: 1rem 10rem;
display: flex;
justify-content: space-between;
}
.clients img {
border: solid 1px black;
}
enter code here