Responsive web design using HTML & CSS | product section | architecture


    
        Hello guys. Welcome to my notes. If you want to see the steps making this tutorial, you can directly watch the video below.  and If you want the code from the tutorial, just scroll down.


HTML

<!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>Architecture section</title>
    </head>
    <body>
        <div class="container">
            <div class="card-box">
                <div class="first-item">
                    <p class="item-text">
                        Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                        sed do eiusmod tempor incididunt ut labore et dolore
                        magna aliqua. Ut enim ad minim veniam, quis nostrud
                    </p>
                    <img src="img/1.jpg" alt="img-1" class="img first-img" />
                </div>
                <div class="second-item">
                    <img src="img/2.jpg" alt="" class="img second-img" />
                </div>
                <div class="third-item">
                    <img src="img/3.jpg" alt="" class="img third-img" />
                    <p class="item-text">
                        Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                        sed do eiusmod tempor incididunt ut labore et dolore
                        magna aliqua. Ut enim ad minim veniam, quis nostrud
                    </p>
                </div>
            </div>
        </div>
    </body>
</html>


CSS


@import url("https://fonts.googleapis.com/css2?family=Michroma&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Michroma", sans-serif;
}

.container {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 96px 48px;
}

.card-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.img {
    width: 100%;
    height: auto;
    filter: grayscale(100%);
    transition: all 0.3s ease-in;
}

.img:hover {
    filter: grayscale(0%);
}

.first-img {
    margin-top: 28px;
}

.second-img {
    height: 100%;
    min-height: 640px;
}

.third-img {
    margin-bottom: 28px;
}

.first-item {
    align-self: end;
}

.item-text {
    color: #c1c1c1;
    font-size: 24px;
}

@media screen and (max-width: 980px) {
    .container {
        padding: 56px 36px;
    }

    .card-box {
        grid-template-columns: repeat(1, 1fr);
    }

    .img {
        aspect-ratio: 1/1;
    }

    .second-img {
        min-height: auto;
    }

    .item-text {
        font-size: 20px;
    }
}

or you can get full code in by clicking button bellow :

Download Code

Buy Me A Coffee

Thank You for coming to my notes, if you wanna see another tutorial , you can check to my notes or you can subscribe to my Youtube channel , where I post new tips&tricks and tutorials about HTML, CSS and Javascript. See You !!!

Post a Comment