grid-template-rows property in css

technical talkiess
0

grid-template-rows

 grid-auto-rows

grid-template-columns

grid-template-columns

<!DOCTYPE html>

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>css grid</title>
    <style>
        .container{
            display: grid;
            grid-template-rows: 1fr 1fr 4fr;
            grid-auto-rows: 5fr;
            grid-template-columns: 1fr 2fr 2fr;
            grid-template-columns: repeat(2fr,auto);grid-gap: 4rem;
        }
        .box{
            padding: 10px;
            background-color: red;
            color: black;
            border: 1px solid black;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="box">this is the box - 1</div>
        <div class="box">this is the box - 2</div>
        <div class="box">this is the box - 3</div>
        <div class="box">this is the box - 4</div>
        <div class="box">this is the box - 5</div>
        <div class="box">this is the box - 6</div>
        <div class="box">this is the box - 7</div>
        <div class="box">this is the box - 8</div>
        <div class="box">this is the box - 9</div>
        <div class="box">this is the box - 10</div>
    </div>
</body>
</html>
Tags

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)