display in css

technical talkiess
0

 <!DOCTYPE html>

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Css display proprty</title>
</head>
<style>
    *{
        box-sizing: border-box;
    }
    .item{
        width: 1200px;
        background-color: gray;
        margin: auto;
    }

    img{
        display: block;
        margin: auto;
        width: 30%;
    }
    .heading{
        width: 30%;
        margin: auto;
    }
    .container{
        width: 1200px;
        margin: 12px auto;
    }
    .box{
        background-color: rgb(204, 221, 180);
        width: 33%;
        display: inline-block;
        margin: 12px auto;
        box-sizing: border-box;
    }
    .heading{
        margin: auto;
        width: 200px;
    }
    p{
        /* margin: auto; */
        text-align: center;
        /* width: 1000px; */
    }
</style>
<body>
    <div class="item">
        <img src="https://network.convergenceservices.in/images/avatar/702bb0fbbe97da793446c3fb.jpg" alt="Testing">
        <h3 class="heading">This is heading</h3>
    </div>
    <div class="container">
        <div class="box">
            <h3 class="heading">This is the heading.</h3>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Rerum, porro? Lorem ipsum dolor sit amet consectetur, adipisicing elit. Tempore minima quo voluptate commodi atque illum at vero deleniti aspernatur excepturi?</p>
        </div>
        <div class="box">
            <h3 class="heading">This is the heading.</h3>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Rerum, porro? Lorem ipsum dolor sit amet consectetur, adipisicing elit. Tempore minima quo voluptate commodi atque illum at vero deleniti aspernatur excepturi?</p>
        </div>
        <div class="box">
            <h3 class="heading">This is the heading.</h3>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Rerum, porro? Lorem ipsum dolor sit amet consectetur, adipisicing elit. Tempore minima quo voluptate commodi atque illum at vero deleniti aspernatur excepturi?</p>
        </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)