Instagram post card using html and css
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body>
<div class="card">
<div class="post_header">
<img src="profile.jpg" alt="">
<div class="heading">
<p class="main_heading">mr.right</p>
<p class="sub_heading">Europe</p>
</div>
<i class="fas fa-ellipsis-h"></i>
</div>
<div class="post_img">
<img src="profile.jpg" alt=""></div>
<div class="post_footer">
<div class="left_box">
<input type="checkbox" value="" class="btn">
<img src="comment.png" alt="">
<img src="share.png" alt="">
</div>
<div class="right_box">
<img src="bookmark.png" alt="">
</div>
</div>
</div>
</body>
</html>
Css
@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
body{
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.card{
background: white;
padding: 1em;
border-radius: 20px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.089);
}
/* Post Header */
.post_header{
display: flex;
align-items: center;
margin-bottom: 0.4em;
position: relative;
}
.post_header i{
position: absolute;
right: 0;
}
.heading{
margin-left: 0.4em;
}
.heading .main_heading{
font-size: 0.8em;
}
.heading .sub_heading{
font-size: 0.6em;
color: rgba(0, 0, 0, 0.836);
}
.post_header img{
width: 25px;
height: 25px;
border-radius: 50px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.432);
}
/* Post Img */
.post_img img{
width: 230px;
height: 230px;
border-radius: 15px;
box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.397);
}
/* Post Footer */
.post_footer{
width: 100%;
height: 30px;
display: flex;
align-items: center;
justify-content: space-between;
}
.btn{
position: relative;
width: 20px;
height: 20px;
appearance: none;
-webkit-appearance: none;
cursor: pointer;
}
.btn::before{
content: '\f004';
position: absolute;
top: 0;
left: 0;
font-family: 'Font Awesome 5 Free';
font-size: 1.4em;
}
.btn:checked::before{
content: '\f004';
font-weight: 700;
color: red;
}
.left_box{
display: flex;
align-items: center;
}
.left_box img{
width: 18px;
height: 18px;
margin-left: 0.4em;
}
.right_box img{
width: 17px;
height: 17px;
}
So thats what I wanted to share with you guys 👦
And thank you for your time and support.
I wish you guys to enjoy your journey.