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>Member Section</title> </head> <body> <section class="member_section"> <h3 class="head_text">Our Leadership</h3> <p class="body_text"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna </p> <div class="member_list"> <div class="member"> <div class="img_container"> <img src="src/1.jpg" alt="" class="img"> <h5 class="member_name">Lorem Ipsum</h5> <p class="member_position">CEO at whatever</p> </div> </div> <div class="member"> <div class="img_container"> <img src="src/2.jpg" alt="" class="img"> <h5 class="member_name">Lorem Ipsum</h5> <p class="member_position">CEO at whatever</p> </div> </div> <div class="member"> <div class="img_container"> <img src="src/3.jpg" alt="" class="img"> <h5 class="member_name">Lorem Ipsum</h5> <p class="member_position">CEO at whatever</p> </div> </div> <div class="member"> <div class="img_container"> <img src="src/4.jpg" alt="" class="img"> <h5 class="member_name">Lorem Ipsum</h5> <p class="member_position">CEO at whatever</p> </div> </div> </div> </section> </body> </html>
CSS
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700;800&display=swap');
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Open Sans', sans-serif;
}
.member_section{
max-width: 1280px;
width: 100%;
margin: 0 auto;
padding: 64px 48px;
}
.head_text{
font-size: 64px;
font-weight: 700;
line-height: 110%;
letter-spacing: -2.88px;
color: #23242a;
text-align: center;
}
.body_text{
font-size: 28px;
line-height: 120%;
letter-spacing: -0.28px;
color: #23242a;
margin: 24px auto 56px;
max-width: 780px;
text-align: center;
}
.member_list{
display: flex;
flex-direction: row;
gap: 24px;
align-items: center;
justify-content: center;
flex-wrap: wrap;
}
.member{
max-width: 240px;
min-width: 200px;
}
.img_container{
width: 100%;
height: auto;
}
.img{
width: 100%;
aspect-ratio: 5/6;
object-fit: cover;
object-position: center;
height: auto;
border-radius: 24px;
}
.member_name{
font-size: 24px;
font-weight: 700;
margin: 18px 0 0;
}
.member_position{
font-size: 16px;
font-weight: 500;
}
@media screen and (max-width:880px){
.head_text{
font-size: 48px;
}
.body_text{
font-size: 18px;
}
.member_list{
display: grid;
grid-template-columns: repeat(2,1fr);
justify-items: center;
}
.member{
max-width: none;
min-width: none;
}
}
or you can get full code in by clicking button bellow :