GitHub 6956★

Have you seen CSS Scan?

The fastest and easiest way to check, copy and edit CSS.

Learn more →

CSS Scan logo

Media object

HTML

<div class="media-object">
<!-- Media object -->
<div class="media-object__media">...</div>
<!-- Main content -->
<div class="media-object__content">...</div>
</div>

CSS

.media-object {
/* Align sub-items to top */
align-items: start;
display: flex;
}

.media-object__media {
margin-right: 0.5rem;
}

.media-object__content {
/* Take the remaining width */
flex: 1;
}
Demo
Follow me on and to get more useful contents.