CSS Display Property

 <!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 Display property</title>

    <style>

        *{

            box-sizing: border-box;

        }

        header{

            border: 2px solid red;

            margin: auto;

            width: 1200px;

        }

        img{

            margin: auto;

            display: block;

            width: 34px;

        }

        h3{

            text-align: center;

            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

            margin: 0px;

        }

        .box{

            border: 4px solid black;

            background-color: grey;

            margin: 4px 0px;

            padding: 23px;

            display: inline-block;

            width: 33%;

            box-sizing: border-box;

        }

        .container{

            margin: auto;

            width: 1200px;

        }

    </style>

</head>

<body>

    <header class="top">

        <img src="https://www.codewithharry.com/assets/img/logo.png" alt="">

        <h3>Welcome to My Blog</h3>

    </header>

    <div class="container">

        <div class="box">

            <h4 class="heading">Heading</h4>

            <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Aperiam iste assumenda dignissimos ad soluta voluptate ab recusandae tenetur minima omnis animi rem nisi, facilis earum exercitationem maiores numquam harum! Vero, consectetur. Sed, amet enim. Adipisci nam velit, non tempora hic enim repudiandae labore ad quis?</p>

        </div>

        <div class="box">

            <h4 class="heading">Heading</h4>

            <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Aperiam iste assumenda dignissimos ad soluta voluptate ab recusandae tenetur minima omnis animi rem nisi, facilis earum exercitationem maiores numquam harum! Vero, consectetur. Sed, amet enim. Adipisci nam velit, non tempora hic enim repudiandae labore ad quis?</p>

        </div>

        <div class="box">

            <h4 class="heading">Heading</h4>

            <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Aperiam iste assumenda dignissimos ad soluta voluptate ab recusandae tenetur minima omnis animi rem nisi, facilis earum exercitationem maiores numquam harum! Vero, consectetur. Sed, amet enim. Adipisci nam velit, non tempora hic enim repudiandae labore ad quis?</p>

        </div>

    </div>

</body>

</html>

Comments

Popular posts from this blog

Transform Property In CSS

More on CSS Selectors