ShapeYourPath
(current)
Run Code
Live Code Editor- Bootstrap 4 Nested Media Object
Source Code
<!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content=""> <!-- Bootstrap CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <title>Bootstrap Nested Media Object</title> </head> <body> <div class="container mt-4 text-center"> <h1>Nested Nested Media Objects</h1> <p class="text-justify">In this example, you will learn and understand how to create a Bootstrap 4 nested media object. Media objects can also be nested inside other media objects. </p> <div class="media"> <img src="https://picsum.photos/200/300" class="rounded img-fluid m-4" alt="Rounded Image" style="width:150px;height:150px;"> <div class="media-body"> <h5 class="mt-0">Smith Roy <small> <i>Posted on 10 Jan ,2021</i> </small> </h5> <p>Bootstrap provides media object concept that id widely used in the blogging system. Most of the blogging comment system is designed on the concept of media object.</p> <!-- Nested media object --> <div class="media mt-2"> <img src="https://picsum.photos/200/300" class="rounded img-fluid m-4" alt="Rounded Image" style="width:150px;height:150px;"> <div class="media-body"> <h5 class="mt-0">John Doe <small> <i>Posted on 12 Jan,2021</i> </small> </h5> <p>Really your comment is very useful during bloging system development.</p> </div> </div> </div> </div> </div> <!--/container--> <!-- jQuery first, then Popper.js, then Bootstrap JS --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> </body> </html>
Output :
Running