Making bootstrap Card display horizontal


I have made a bootstrap card in my website, and i want to make it horizontal.
This is the default vertical card
and i want to convert it to this horizontal view.

Please provide solution by inspecting my code!

    background-image: linear-gradient(#1385de,#045f9b);
    color: white;
    background-image: linear-gradient(#f8b949,#f7951f);
    background-image: linear-gradient(#ffde5e,#fdd215);
    color: black;
<link href="" rel="stylesheet"/>
<li class="card col-sm-3">
                            <img class="card-img-top" src="" alt="Card image">
                            <div class="card-header brown-bg">
                                SMS Order
                            <div class="card-body blue-bg p-0 mt-1">
                                <p class="card-text">Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit.</p>
                                <a href="#" class="btn btn-primary order-btn2">Place Order</a>



Basically bootstrap has inbuilt solution to it its Horizontal Card you can make card both in horizontal and vertical.

Here is a simple example for horizontal card.

<link href="" rel="stylesheet"/>
<div class="card mb-3" style="max-width: 540px;">
  <div class="row no-gutters">
    <div class="col-4">
      <img src="" class="card-img" alt="...">
    <div class="col-8">
      <div class="card-body">
        <h5 class="card-title">Card title</h5>
        <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
        <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>

Answered By – sanoj lawrence

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published