JSFiddle - React, Tailwind, and code Playground

by Gabriel

HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        body {
            margin: 0;
            display: flex;
            flex-direction: column;
            height: 100vh; /* 100% viewport height */
        }

        .fixed-box {
            height: 100px; /* Fixed height for the first box */
            background-color: lightblue;
        }

        .flexible-box {
            flex: 1; /* Take up the remaining vertical space */
            background-color: lightgreen;
            border-bottom: 5px solid red;
        }
    </style>
</head>
<body>
    <div class="fixed-box">Fixed Box</div>
    <div class="flexible-box">Flexible Box</div>
</body>
</html>