"BS4 timeline ol/ul > li"
Bootstrap 4.1.1 Snippet by mylastof

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class=""> <div class="container"> <h2 class="pb-3 pt-2 border-bottom mb-5">Vertical Left-Right Timeline</h2> <ol class="list-unstyled"> <li> <h5>Fully Responsive</h5> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed porttitor gravida aliquam. Morbi orci urna, iaculis in ligula et, posuere interdum lectus.</p> </li> <li> <h5>Using Bootstrap</h5> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed porttitor gravida aliquam. Morbi orci urna, iaculis in ligula et, posuere interdum lectus.</p> </li> <li> <h5>Now with Pug and Sass</h5> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed porttitor gravida aliquam. Morbi orci urna, iaculis in ligula et, posuere interdum lectus.</p> </li> </ol> </div> </div>
ol:before, ol:after { content: ""; background: #fff; width: 5px; height: 60px; position: absolute; z-index: 2; } ol:before { margin: 0 0 0 -1px; } ol:after { margin: -50px 0 0 -1px; } li { border: 2px solid; border-color: lightcoral !important; margin:0 0 -2px 0; padding: 30px; counter-increment: li; position: relative; } li:nth-child(odd):before, li:nth-child(even):before { content: counter(li); display: flex; -ms-flex-pack: center!important; justify-content: center!important; -ms-flex-align: center!important; align-items: center!important; position: absolute; border-radius: 50%; height: 50px; width: 50px; background-color: lightcoral; color: white; font-weight: bold; z-index: 3; } li:nth-child(odd):before { right: 100%; margin-right: -20px; } li:nth-child(even):before { left: 100%; margin-left: -20px; } li:nth-child(odd) { border-right: none; border-left: 2px solid; border-top-left-radius: 10px; border-bottom-left-radius: 10px; margin-right: 30px; padding-right: 0; } li:nth-child(even) { border-left: none; border-right: 2px solid; border-top-right-radius: 10px; border-bottom-right-radius: 10px; margin-left: 30px; padding-left: 0; text-align: right; } li:first-child { border-top: none; border-top-right-radius:0; border-top-left-radius:0; } li:last-child { border-bottom: none; border-bottom-right-radius:0; border-bottom-left-radius:0; }

Related: See More


Questions / Comments: