I know how to wrap items (in theory) but I must be doing something wrong. These are refusing.
I just want two profiles, side by side, that stack into a column when the window width shrinks. At the moment, they sort of squish together and overlap.
#profile-container {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
align-content: center;
padding-bottom: 5%;
}
.profile-desc {
width: 35%;
margin: 5% 5%;
text-align: center;
}
#profileM {
height: 230px;
width: 219px;
}
#profileF {
height: 230px;
width: 219px;
}
<div id="profile-container">
<div class="profile-desc" style="float:left;width:35%;padding: 5px;">
<img src="images/male.jpg" id="profileM">
<h3 style="color:white;background-color:rgb(244,212,69);">
Name
</h3>
<h4 style="color: rgb(244,212,69);">
Occupation
</h4>
<p>
Description
</p>
</div>
<div class="profile-desc" style="float:right;width:35%; padding: 5px;">
<img src="images/female.jpg" id="profileF">
<h3 style="color:white;background-color:rgb(244,212,69);">
Name
</h3>
<h4 style="color: rgb(244,212,69);">
Occupation
</h4>
<p>
Description
</p>
</div>
</div>