0
votes

I need to relocate(Vertically) the red box and the white box to the bottom of the green box. How can i do this?

I tried including flex and items-end but couldn't figure it out (Didn't include here)

https://play.tailwindcss.com/BiTu0woXJi

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div class="grid grid-cols-2 boder-2 border-black space-x-4">
    <div class="p-4 bg-yellow-200 border-2 border-black">
      <ol>
        <li>Item</li>
        <li>Item</li>
        <li>Item</li>
        <li>Item</li>
        <li>Item</li>
        <li>Item</li>
        <li>Item</li>
        <li>Item</li>
        <li>Item</li>
        <li>Item</li>
        <li>Item</li>
      </ol>
    </div>
    <div class="p-4 bg-green-200 border-2 border-black">
      <div class="grid grid-cols-4 border-2 border-black"><!--first row-->
        <button class="border-2 border-black bg-red-400 px-4 py-2">test</button>
        <button class="col-start-3 border-2 bg-white border-black px-4 py-2">test</button>
      </div>
      <div>
        <div class="grid grid-cols-4 border-2 border-black"><!--second row-->                  
            <button class="border-2 border-black bg-red-400 px-4 py-2">test</button>
            <button class="col-start-3 border-2 bg-white border-black px-4 py-2">test</button>          
        </div>
      </div>
    </div>
  </div>
</body>
</html>
2

2 Answers

0
votes
0
votes

I'm not quite sure what you're trying to implement, but try this and let me know if it's not your goal :)

<div class="p-4 bg-green-200 border-2 border-black flex flex-col justify-end"> `<--- check here, with justify-end`
  <div class="grid grid-cols-4 border-2 border-black"><!--first row-->
    <button class="border-2 border-black bg-red-400 px-4 py-2">test</button>
    <button class="col-start-3 border-2 bg-white border-black px-4 py-2">test</button>
  </div>
  <div class="grid grid-cols-4 border-2 border-black"><!--second row-->                  
    <button class="border-2 border-black bg-red-400 px-4 py-2">test</button>
    <button class="col-start-3 border-2 bg-white border-black px-4 py-2">test</button>          
  </div>
</div>