Responsive Web Design with Flexbox: Simple Techniques - 05

                                                                                







































Hello Developers, we are excited to introduce a versatile and efficient grid layout snippet, meticulously designed with HTML and CSS. This snippet empowers you to create well-structured and visually appealing layouts for your website, offering a flexible way to arrange content in a clean and organized manner. The grid layout is perfect for displaying various types of content, including images, text, and multimedia, making it an indispensable tool for modern web design. The grid layout snippet is fully responsive, ensuring your content looks fantastic on any device, from desktops to smartphones. The layout is highly customizable, allowing you to define the number of columns and rows, adjust the spacing, and align items precisely as needed. By utilizing CSS Grid properties, you can create complex and unique designs that adapt seamlessly to different screen sizes and orientations, enhancing the overall user experience. Integrating this HTML and CSS grid layout snippet into your website not only enhances its visual appeal but also boosts its functionality. This snippet demonstrates your commitment to quality web design, providing a flexible and robust framework for organizing content. Whether you are creating a portfolio, an e-commerce site, or a blog, this grid layout will help you present your content in a professional and aesthetically pleasing manner. Experiment with different configurations and styles to create a layout that perfectly matches your vision and needs.

How to make Flexbox Layout using HTML and CSS.[Source Code]

To make this website, you would like to make two files: an HTML file, a CSS file. First, create an HTML file with the name of index.html and remember, you have to create a file with a .html extension.

<!DOCTYPE html> <html lang="en"> <head> <title>Responsive Flexbox Layout Using HTML & CSS</title> <meta name="description" content="Responsive Profile card Using HTML & CSSt. Made by learningrobo.com"> <meta name="author" content="learningrobo.com"> <meta name="keywords" content="form,responsive,learningrobo.com,html & css projects,Flexbox,Flexbox Layout"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="icon" type=image/x-icon href="#"> <meta charset="UTF-8"> <script src="https://kit.fontawesome.com/5d72166fb5.js" crossorigin="anonymous"></script> <link rel="stylesheet" href="style.css"> </head> <body> <!--Hello Future Developer Thanks for Using learningrobo.com, Share & Support us--> <div class="container"> <div class="c1"> <div class="p1"> <div class="p1c1">Item 1</div> <div class="p1c2">Item 2</div> </div> <div class="p2">Item 3</div> <div class="p3"> <div class="p3c1">Item 4</div> <div class="p3c2">Item 5</div> </div> <div class="p4"> <div class="p4c1">Item 6</div> <div class="p4c2">Item 7</div> </div> </div> <div class="c2"> <div class="g1">Item 8</div> <div class="g2">Item 9</div> <div class="g3">Item 10</div> <div class="g4">Item 11</div> <div class="g5">Item 12</div> </div> </div> <div class="credit">Made with <span>❤ </span>by<a href="https://www.learningrobo.com/">learningrobo</a></div> <!--Check our website Regularly For New Snippets Post--> </body> </html>
CSS provides style to an HTML page. To make the page attractive create a CSS file with the name style.css and remember that you have to make a file with a .css extension.


/** 
Hello Future Developer Thanks for Using learningrobo.com, 
Check our website Regularly For New Snippets Post.

Share & Support us
**/
@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');
*{
    margin: 0px;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}
.container{
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    background-color: gainsboro;
    gap: 5px;
    padding: 5px;
}
.container .c1{
    display: flex;
    height: 66.6vh;
    width: 100%;
    gap: 5px;
}
.container .c1 .p1{
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 20%;
    gap: 5px;
}
.container .c1 .p1 .p1c1{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50%;
    width: 100%;
    background-color:darkseagreen;
    border: 2px solid black;
    border-radius: 5px;
}
.container .c1 .p1 .p1c2{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50%;
    width: 100%;
    background-color:darkgoldenrod;
    border: 2px solid black;
    border-radius: 5px;
}
.container .c1 .p2{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 40%;
    background-color:darkturquoise;
    border: 2px solid black;
    border-radius: 5px;
}
.container .c1 .p3{
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 20%;
    gap: 5px;
}
.container .c1 .p3 .p3c1{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50%;
    width: 100%;
    background-color:blue;
    border: 2px solid black;
    border-radius: 5px;
}
.container .c1 .p3 .p3c2{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50%;
    width: 100%;
    background-color:blueviolet;
    border: 2px solid black;
    border-radius: 5px;
}
.container .c1 .p4{
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 20%;
    gap: 5px;
}
.container .c1 .p4 .p4c1{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50%;
    width: 100%;
    background-color:brown;
    border: 2px solid black;
    border-radius: 5px;
}
.container .c1 .p4 .p4c2{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50%;
    width: 100%;
    background-color:burlywood;
    border: 2px solid black;
    border-radius: 5px;
}
.container .c2{
    display: flex;
    height: 33.3vh;
    width: 100%;
    gap: 5px;
}
.container .c2 .g1{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 20%;
    background-color:cadetblue;
    border: 2px solid black;
    border-radius: 5px;
}
.container .c2 .g2{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 20%;
    background-color:chartreuse;
    border: 2px solid black;
    border-radius: 5px;
}
.container .c2 .g3{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 20%;
    background-color:cornflowerblue;
    border: 2px solid black;
    border-radius: 5px;
}
.container .c2 .g4{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 20%;
    background-color:crimson;
    border: 2px solid black;
    border-radius: 5px;
}
.container .c2 .g5{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 20%;
    background-color:darkcyan;
    border: 2px solid black;
    border-radius: 5px;
}
.credit a {
    text-decoration: none;
    color: #121212;
    font-weight: 800;
}
.credit {
    color: #121212;
    text-align: center;
    margin-top: 10px;
    font-family: Verdana,Geneva,Tahoma,sans-serif;
}
.credit span{
    color:#000;
    font-size:20px;
}     
@media screen and (max-width:630px) {
    .container .c1{
        flex-direction: column;
        width: 100%;
    }
    .container .c1 .p1,.container .c1 .p2, .container .c1 .p3, .container .c1 .p4{
        flex-direction: row;
        height: 100%;
        width: 100%;
    }
    .container .c1 .p1 .p1c1, .container .c1 .p1 .p1c2{
        height: 100%;
    }
    .container .c1 .p3 .p3c1, .container .c1 .p3 .p3c2{
        height: 100%;
    }
    .container .c1 .p4 .p4c1, .container .c1 .p4 .p4c2{
        height: 100%;
    }
    .container .c2{
        flex-direction: column;
        height: 50%;
        width: 100%;
    }
    .container .c2 .g1, .container .c2 .g2, .container .c2 .g3, .container .c2 .g4, .container .c2 .g5{
        height: 100%;
        width: 100%;
    }
}
We hope you would like this Flexbox Layout using HTML and CSS.

Thank you for reading our blog. If you face any problem in Creating a Flexbox Layout using HTML and CSS., then contact us or comment to us. We’ll try to provide a solution to your problem as soon as possible.

Press The Key ' p ' and say ' read article ' our voice assistant read our article.
In Our older post it doesnot work we working on that.












Thank you
Learning robo team

إرسال تعليق

Thank you
Learning robo team

Post a Comment (0)

أحدث أقدم
Learning Robo says...
code copied
Welcome