I'm currently working on designing people cards and I am facing some challenges when trying to position the image on the left side and the text on the right side of the card.
https://i.sstatic.net/ljcvv.png
.row {
display: flex;
flex-wrap: wrap;
margin-right: -15px;
margin-left: -15px;
}
.col-lg-3 {
position: relative;
width: 100%;
padding-right: 15px;
padding-left: 15px;
}
.media {
margin: 20px 0;
padding: 10px;
vertical-align: middle;
display: inline-block;
width: 100%;
overflow-wrap: break-word;
word-wrap: break-word;
}
<div class="row">
<div class="col-lg-3">
<div class="media">
<div id="left_div">
<img src="/web/image/hr.employee/7/image">
</div>
<div id="right_div">
<span class="label label-default">Marc Demo
<hr style="margin: 0em; border-width: 2px;">
</span>
<span class="label label-default"> HIPOACUSICOS
<hr style="margin: 0em; border-width: 2px;">
</span>
<span class="label label-default"><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e08d81928bce82928f978ed2d3a08598818d908c85ce838f8d">[email protected]</a>
<hr style="margin: 0em; border-width: 2px; display: none;">
</span>
</div>
</div>
</div>
I've attempted to use CSS properties like position, width, and others on "left_div" and "right_div", but I'm struggling to format it correctly. Any suggestions would be greatly appreciated!
Edit: After using display: flex and align-items: center, this is the resulting layout: https://i.sstatic.net/iqHP7.png
Could it be an issue with inherited styles from other parent divs?
Thank you for taking the time to review this!