grid in css

technical talkiess
0

 <!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>Grid css template practice</title>
</head>
<style>
    .container{
        display: grid;
        grid-template-rows: 1fr 2fr 1fr;
        grid-auto-rows:3fr ;
        grid-template-columns: 1fr 1fr 3fr;
        grid-template-columns: repeat(4fr,auto);
        grid-gap: 2px;
    }
    .box{
        padding: 10px 20px;
        background-color: red;
        border: 1px solid black;
        margin: 1px;
    }
</style>
<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)