Niels
Niels

Reputation: 145

How can i achieve this bootstrap layout using cards in one row?

I'm trying to create a bootstrap card layout like this in a row:

enter image description here

What I've tried so far is this:

<div class="row">
    <div class="col-lg-3">
    </div>
    <div class="col-lg-3">
    </div>        
    <div class="col-lg-9">
    </div>
</div>

That results in something like this:

enter image description here

Anyone have any ideas? Thanks in advance!:)

BTW* I'm using Bootstrap 4.

Upvotes: 0

Views: 132

Answers (3)

Rayees AC
Rayees AC

Reputation: 4659

Please try this

---col-lg-3

----------col-12

----------col-12

---col-lg-9

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<div class="row border border-black">
    <div class="col-3 h-auto">
      <div class="row h-100">
        <div class="col-12 border border-dark text-center my-auto"><h6>col-lg-3</h6></div>
        <div class="col-12 border border-dark text-center my-auto"><h6>col-lg-3</h6></div>
      </div>
    </div>
    <div class="col-9 h-auto border border-dark"><h6 class="h-100 d-flex align-items-center">col-lg-9</h6></div>       
</div>

Upvotes: 0

نور
نور

Reputation: 1527

You can try like this...

<div class="row">
    
        <div class="col-lg-3">
          
          <div class="row">
            <div class="col-12">
            </div>
            <div class="col-12">
           </div>
          </div>
    
        </div>
            
        <div class="col-lg-9">
        </div>
    
    </div>

Upvotes: 1

ThibautM
ThibautM

Reputation: 71

I would do something like this in Bootstrap 4:

<div class="row">
  <div class="col-lg-3">
    <div class="row">
      <p>Col-lg-3</p>
    </div>
    <div class="row">
      <p>Col-lg-3</p>
    </div>
  </div>        
  <div class="col-lg-9">
    <p>Col-lg-9</p>
  </div>
</div>

Upvotes: 0

Related Questions