FLEX BOX USE CASE 1

 <!DOCTYPE html>

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <title>Document</title>
</head>
<body>


    <div class="parent">
        <div class="box one">
   
            <img class="box-img" src="https://source.unsplash.com/1600x1000/?burger" alt="">
   
            <div class="content">
   
                <h3 class="title">Welcome To CSS</h3>
                <p class="desc">Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur, ullam.</p>
   
            </div>
   
   
        </div>
   
   
   
        <div class="box two">
   
            <img class="box-img" src="https://source.unsplash.com/1600x1000/?burger" alt="">
   
            <div class="content">
   
                <h3 class="title">Welcome To CSS</h3>
                <p class="desc">Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur, ullam.</p>
   
            </div>
   
   
        </div>
   
   
   
        <div class="box three">
   
            <img class="box-img" src="https://source.unsplash.com/1600x1000/?burger" alt="">
   
            <div class="content">
   
                <h3 class="title">Welcome To CSS</h3>
                <p class="desc">Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur, ullam.</p>
   
            </div>
   
   
        </div>

        <div class="box three">
   
            <img class="box-img" src="https://source.unsplash.com/1600x1000/?burger" alt="">
   
            <div class="content">
   
                <h3 class="title">Welcome To CSS</h3>
                <p class="desc">Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur, ullam.</p>
   
            </div>
   
   
        </div>


        <div class="box three">
   
            <img class="box-img" src="https://source.unsplash.com/1600x1000/?burger" alt="">
   
            <div class="content">
   
                <h3 class="title">Welcome To CSS</h3>
                <p class="desc">Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur, ullam.</p>
   
            </div>
   
   
        </div>


        <div class="box three">
   
            <img class="box-img" src="https://source.unsplash.com/1600x1000/?burger" alt="">
   
            <div class="content">
   
                <h3 class="title">Welcome To CSS</h3>
                <p class="desc">Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur, ullam.</p>
   
            </div>
   
   
        </div>


        <div class="box three">
   
            <img class="box-img" src="https://source.unsplash.com/1600x1000/?burger" alt="">
   
            <div class="content">
   
                <h3 class="title">Welcome To CSS</h3>
                <p class="desc">Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur, ullam.</p>
   
            </div>
   
   
        </div>


        <div class="box three">
   
            <img class="box-img" src="https://source.unsplash.com/1600x1000/?burger" alt="">
   
            <div class="content">
   
                <h3 class="title">Welcome To CSS</h3>
                <p class="desc">Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur, ullam.</p>
   
            </div>
   
   
        </div>
   
   
   
   
   
    </div>
   
   
</body>
</html>

// CSS FILE

.box{

    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    border: solid rgb(181, 181, 181);
    border-width: 1px;
    width: 400px;
    margin:20px auto;
    border-radius: 10px 10px 0px 0px;
    flex-grow: 1;
   
}

.box-img{

    width:100%;
    border-radius: 10px 10px 0px 0px;


}

.title{
    margin: 0px auto;


}

.desc{
    font-size: 14px;
    margin: 7px auto;
   

}

.content{

    padding: 10px;

}

.parent{
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
   





}

/* .one{
    flex-grow: 1;



}

.two{
    flex-grow: 1;
   





}

.three{
    flex-grow: 1;





} */

Output:-



Comments

Popular posts from this blog

Array Mapping and Filters Assignment

Rolling Dice

Basics Of Java Script Till DOM Beggining