Hello. Can’t figure out why my code doesn’t work as I want.
I have 3 elements. I want to place one element in the upper left corner, one in the right bottom corner and one element in the center using Flexbox.
The centered element is not aligned in the center correctly and looks more on the left side.
What I’m doing wrong?
<div class="container">
<div class="team">
<p class="team-info">Info</p>
<h5 class="team-desc">We are the industry gurus when it comes to digital</h5>
<p class="team-cta"><a href="#">LEARN MORE</a></p>
</div>
</div>
.container {
display: flex;
align-items: center;
justify-content: center;
height: 900px;
}
.team {
display: flex;
align-items: center;
justify-content: center;
background-image: url('../img/team-bg-1.jpg');
background-repeat: no-repeat;
background-size: cover;
height: 400px;
width: 900px;
color:white;
}
.team-info {
align-self: flex-start;
}
.team-desc {
display: flex;
align-self: center;
justify-self: center;
text-align: center;
font-size: 34px;
}
.team-cta {
align-self: flex-end;
text-decoration: underline;
}
Thank you very much in advance for your help.
Helena