Bootstrap 4 Tutorial
A simple method for aligning media items (such as pictures or videos) with content is to use bootstrap. Media objects are frequently used to show tweets, blog comments, and other content:
Place media material inside a child container with the .media-body class and add the .media class to the container element to create a media object. Use the spacing tools to add margins and padding as necessary:
John Doe Posted on February 19, 2016
Lorem ipsum...
A media object inside another media object is known as nested media objects:
Place a fresh .media container within the .media-body container to nest media objects:
John Doe Posted on February 19, 2016
Lorem ipsum...
Jane Doe Posted on February 20 2016
Lorem ipsum...
Place the media picture after the .media-body container to position it to the right:
John Doe Posted on February 19, 2016
Lorem ipsum...
Utilize the align-self-* classes and flex utilities to position the media object at the top, middle, or bottom:
Media Top
Lorem ipsum...
Media Middle
Lorem ipsum...
Media Bottom
Lorem ipsum...
CodingAsk.com is designed for learning and practice. Examples may be made simpler to aid understanding. Tutorials, references, and examples are regularly checked for mistakes, but we cannot guarantee complete accuracy. By using CodingAsk.com, you agree to our terms of use, cookie, and privacy policy.
Copyright 2010-2024 by Refsnes Data. All Rights Reserved.