Responsive web design using HTML & CSS | service section | modern 1



        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>Service section</title> </head> <body> <section class="service"> <h3 class="service_header text"> Lorem ipsum dolor sit amet, consectetur </h3> <h4 class="service_text text">sed do eiusmod tempor incididunt</h4> <div class="service_box"> <div class="service_box_item"> <img src="src/cloud.svg" alt="" class="item_icons" /> <h5 class="item_header">Lorem ipsum dolor sit amet</h5> <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 class="service_box_item"> <img src="src/cloud.svg" alt="" class="item_icons" /> <h5 class="item_header">Lorem ipsum dolor sit amet</h5> <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 class="service_box_item"> <img src="src/cloud.svg" alt="" class="item_icons" /> <h5 class="item_header">Lorem ipsum dolor sit amet</h5> <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 class="service_box_item"> <img src="src/cloud.svg" alt="" class="item_icons" /> <h5 class="item_header">Lorem ipsum dolor sit amet</h5> <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 class="service_box_item"> <img src="src/cloud.svg" alt="" class="item_icons" /> <h5 class="item_header">Lorem ipsum dolor sit amet</h5> <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 class="service_box_item"> <img src="src/cloud.svg" alt="" class="item_icons" /> <h5 class="item_header">Lorem ipsum dolor sit amet</h5> <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> </section> </body> </html>

CSS

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Michroma&display=swap"); * { margin: 0; padding: 0; box-sizing: border-box; list-style: none; font-family: "Inter", sans-serif; } .service { max-width: 1280px; margin: 0 auto; padding: 96px 48px; width: 100%; } .text { text-align: center; font-size: 36px; font-weight: 700; } .service_header { color: #3b82f6; } .service_text { color: #c1c1c1; margin: 12px 0 64px; } .service_box { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; } .service_box_item { border-radius: 24px; background: #f6f6f6; padding: 32px; } img { max-width: 28px; } .item_header { color: #333333; font-size: 20px; font-weight: 600px; margin: 16px 0 12px; } .item_text { color: #666666; font-size: 600; font-weight: 500; } @media screen and (max-width: 960px) { .service_box { grid-template-columns: repeat(2, 1fr); } } @media screen and (max-width: 640px) { .service_box { grid-template-columns: repeat(1, 1fr); } .service { padding: 64px 24px; margin: 0 auto; } .text { font-size: 28px; } .service_text { margin: 12px 0 48px; } }

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