Bootstrap snippet and html example. latest news widget

This html snippet was created to help web designers, web developers, front-end and back-end developer save time. Use it for free in your project and build your app faster, You can also download the HTML, CSS, and JS code.
Tags: news,blog

HTML code

This is the html code used to create this bootstrap snippet, You can copy and paste the following html code inside a page with bootstrap 4.4.1 included, to get the result that you can see in the preview selection

<div class="container">
    <div class="row no-gutters">
      <div class="col-xl-6 col-12 mb-5 mb-xl-0">
        <div class="media media-news">
          <div class="media-img">
            <img src="https://www.bootdey.com/image/350x280/FFB6C1/000000" alt="Generic placeholder image">
          </div>
          <div class="media-body">
            <span class="media-date">25 july 2017</span>
            <h5 class="mt-0 sep">Finibus Bonorum Malor.</h5>
            <p>Lorem ipsum dolor amet consectetur adip sicing elit sed eiusm tempor incididunt ut labore dolore.</p>
            <a href="blog-post-right-sidebar.html" class="btn btn-transparent">View More</a>
          </div>
        </div>
      </div>
      
      <div class="col-xl-6 col-12">
        <div class="media media-news">
          <div class="media-img">
            <img src="https://www.bootdey.com/image/350x280/87CEFA/000000" alt="Generic placeholder image">
          </div>
          <div class="media-body">
            <span class="media-date">13 August 2018</span>
             <h5 class="mt-0 sep"> Tincidunt dui ornare</h5>
            <p>Facilisi morbi tempus iaculis urna id volutpat lacus. Mi eget mauris pharetra et. Fermentum iaculis</p>
            <a href="blog-post-right-sidebar.html" class="btn btn-transparent">View More</a>
          </div>
        </div>
      </div>
    </div>
    
    <div class="row no-gutters mt-4">
      <div class="col-xl-6 col-12 mb-5 mb-xl-0">
        <div class="media media-news">
          <div class="media-img">
            <img src="https://www.bootdey.com/image/350x280/FF7F50/000000" alt="Generic placeholder image">
          </div>
          <div class="media-body">
            <span class="media-date">25 july 2017</span>
            <h5 class="mt-0 sep">Finibus Bonorum Malor.</h5>
            <p>Lorem ipsum dolor amet consectetur adip sicing elit sed eiusm tempor incididunt ut labore dolore.</p>
            <a href="blog-post-right-sidebar.html" class="btn btn-transparent">View More</a>
          </div>
        </div>
      </div>
      
      <div class="col-xl-6 col-12">
        <div class="media media-news">
          <div class="media-img">
            <img src="https://www.bootdey.com/image/350x280/20B2AA/000000" alt="Generic placeholder image">
          </div>
          <div class="media-body">
            <span class="media-date">13 August 2018</span>
             <h5 class="mt-0 sep"> Tincidunt dui ornare</h5>
            <p>Facilisi morbi tempus iaculis urna id volutpat lacus. Mi eget mauris pharetra et. Fermentum iaculis</p>
            <a href="blog-post-right-sidebar.html" class="btn btn-transparent">View More</a>
          </div>
        </div>
      </div>
    </div>
</div>

CSS code

This is the css code used to create this bootstrap snippet, You can copy and paste the following css code inside a page with bootstrap 4.4.1 included, to get the result that you can see in the preview selection

body{
    background-color: #eee;
    margin-top:20px;
}
.media.media-news {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    position: relative;
    padding-bottom: 210px;
}
@media (min-width: 768px) {
    .media.media-news {
        padding-bottom: 0;
        margin-bottom: 0;
    }
}
@media (min-width: 1200px) {
    .media.media-news {
        padding-bottom: 25px;
        margin-bottom: 0;
    }
}
.media.media-news .media-body {
    padding: 20px;
    box-shadow: 0 22px 28px 0 rgba(0, 0, 0, 0.06);
    background: #fff;
    position: absolute;
    width: 85%;
    right: 0;
    bottom: 0;
}
@media (min-width: 768px) {
    .media.media-news .media-body {
        position: relative;
        padding: 46.5px 35px;
        right: 0;
    }
}
@media (min-width: 992px) {
    .media.media-news .media-body {
        right: 40px;
        bottom: 0;
    }
}
@media (min-width: 1200px) {
    .media.media-news .media-body {
        position: absolute;
        right: 35px;
        width: 60%;
        padding: 20px;
    }
}
.media.media-news .media-body .media-date {
    font-family: "Open Sans", sans-serif;
    color: #848484;
    margin-bottom: 10px;
}
.media.media-news .media-body h5 {
    font-size: 22px;
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.media.media-news .media-body h5.small {
    font-size: 16px;
}
.media.media-news .media-body p {
    font-family: "Open Sans", sans-serif;
    color: #848484;
}
.media.media-news .media-body .common-btn {
    margin-top: 10px;
}

Similar snippets

Bootstrap example and template. bs4 blog post image

bs4 blog post image

Bootstrap example and template. Blog user profile

Blog user profile

Bootstrap example and template. blog item

blog item

Bootstrap example and template. bs4 post list

bs4 post list

Bootstrap example and template. bs5 dark footer

bs5 dark footer

Bootstrap example and template. bs4 contact form

bs4 contact form

Bootstrap example and template. chat app

chat app

Bootstrap example and template. Gradients dashboard cards

Gradients dashboard cards

Bootstrap example and template. latest news widget

About this bootstrap example/template

We hope you will enjoy this awesome snippet and stay tuned for the latest updates, bootdey snippets are already used in thousands of blogs, websites and projects. We believe it will save your precious time and gives trendy look to your next web project.

We always try to offer the best beautiful and responsive source of Bootstrap code examples and components.

This code example currectly have 9.9K views, Using this bootstrap snippet you have the following benefits:

Bootstrap 4.4.1

<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css'>

<script src='https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js'></script>

This code example is based on bootstrap 4.4.1 and the grid system of this framework

Responsive

Based on bootstrap framework makes all the layouts perfectly responsive for all devices

Crossbrowser compatibility

Tested on all major browsers, it works smoothly on all of them

semantic html 5

Built on html / css3 the code quality is really amazing

Simple Integration

This code example can be simply integrated on existing sites and new ones too, all you need to do is copy the code and start working