Media Object
Default media object
The default media displays a media object (images, video, audio) to the left or right of a content block.
Media heading
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.Media heading
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.Media object
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
<div class="media mb-3">
<img class="d-flex mr-3 rounded-circle" src="assets/images/users/avatar-10.jpg" alt="Generic placeholder image" height="64">
<div class="media-body">
<h5 class="mt-0">Media heading</h5>
...
</div>
</div>
<div class="media mb-3">
<div class="avatar-md mr-3">
<span class="avatar-title bg-success-lighten text-success font-20 rounded-circle">
MD
</span>
</div>
<div class="media-body">
<h5 class="mt-0">Media heading</h5>
...
<div class="media mt-3">
<a class="d-flex pr-3" href="#">
<img src="assets/images/users/avatar-3.jpg" alt="Generic placeholder image" height="64" class="rounded-circle">
</a>
<div class="media-body">
<h5 class="mt-0">Media heading</h5>
...
</div>
</div>
</div>
</div>
<div class="media">
<div class="media-body">
<h5 class="mt-0 mb-1">Media object</h5>
...
</div>
<img class="d-flex ml-3 rounded-circle" src="assets/images/users/avatar-4.jpg" alt="Generic placeholder image" height="64">
</div>
Media Alignment
Media in a media object can be aligned with flexbox utilities to the top (default), middle, or end of your .media-body
content.
Top-aligned media
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
Center-aligned media
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
Bottom-aligned media
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
<div class="media mb-3">
<img class="d-flex align-self-start rounded mr-3" src="assets/images/users/avatar-5.jpg" alt="Generic placeholder image" height="64">
<div class="media-body">
<h5 class="mt-0">Top-aligned media</h5>
<p class="mb-0">...</p>
</div>
</div>
<div class="media mb-3">
<div class="avatar-md mr-3">
<span class="avatar-title bg-danger-lighten text-danger font-20 rounded-circle">
CA
</span>
</div>
<div class="media-body">
<h5 class="mt-0">Center-aligned media</h5>
<p class="mb-0">...</p>
</div>
</div>
<div class="media">
<img class="d-flex align-self-end rounded mr-3" src="assets/images/users/avatar-7.jpg" alt="Generic placeholder image" height="64">
<div class="media-body">
<h5 class="mt-0">Bottom-aligned media</h5>
<p class="mb-0">...</p>
</div>
</div>