How To Make A Website Like Instagram Using HTML CSS - Instagram Redesign

 


HTML Code
<!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>Instagram Redesign Desktop</title>
    <!-- Link To CSS -->
    <link rel="stylesheet" href="style.css">
    <!-- Remix Icons -->
    <link href="https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css" rel="stylesheet">

</head>
<body>
    <!-- Sidebar -->
    <div class="sidebar">
        <a href="#" class="logo">
            <img src="img/logo.png" alt="">
        </a>
        <!-- Profile Image -->
        <div class="profile">
            <div class="profile-img">
                <img src="img/profile.jpg" alt="">
            </div>
            <div class="name">
                <h1>Dua Lipa</h1>
                <img src="img/verify.png" alt="">
            </div>
            <span>@lipa</span>
        </div>
        <!-- About -->
        <div class="about">
            <!-- Box 1 -->
            <div class="box">
                <h3>54</h3>
                <span>Posts</span>
            </div>
             <!-- Box 2 -->
             <div class="box">
                <h3>14.4k</h3>
                <span>Followers</span>
            </div>
             <!-- Box 3 -->
             <div class="box">
                <h3>14</h3>
                <span>Following</span>
            </div>
        </div>
        <!-- Menu -->
        <div class="menu">
            <a href="#" class="active">
                <span class="icon">
                    <i class="ri-function-line"></i>
                </span>
                Feed
            </a>
            <a href="#">
                <span class="icon">
                    <i class="ri-search-line"></i>
                </span>
                Explore
            </a>

            <a href="#">
                <span class="icon">
                    <i class="ri-notification-4-line"></i>
                </span>
                Notification
            </a>

            <a href="#">
                <span class="icon">
                    <i class="ri-mail-unread-fill"></i>
                </span>
                Messages
            </a>

            <a href="#">
                <span class="icon">
                    <i class="ri-send-plane-fill"></i>
                </span>
                Direct
            </a>

            <a href="#">
                <span class="icon">
                    <i class="ri-bar-chart-2-fill"></i>
                </span>
                Stats
            </a>

            <a href="#">
                <span class="icon">
                    <i class="ri-settings-5-line"></i>
                </span>
                Setting
            </a>

            <a href="#">
                <span class="icon">
                    <i class="ri-logout-box-r-line"></i>
                </span>
                Logout
            </a>
        </div>
    </div>
    <!-- Main Home -->
    <div class="main-home">
        <!-- Header -->
        <div class="header">
            <!-- Search -->
            <div class="search">
                <i class="ri-search-line"></i>
                <input type="text" placeholder="Search">
            </div>
            <!-- Content -->
            <div class="header-content">
                <i class="ri-notification-4-fill"></i>
                <i class="ri-mail-unread-fill"></i>
                <!-- Button -->
                <a href="#" class="btn">
                    <i class="ri-add-circle-fill"></i>
                    <div class="btn-text">Add Photo</div>
                </a>
            </div>
        </div>
        <!-- Stories -->
        <div class="stories-title">
            <h1>Stories</h1>
            <a href="#" class="btn">
                <i class="ri-play-circle-line"></i>
                <div class="text">Watch all</div>
            </a>
        </div>
        <!-- Stories Content -->
        <div class="stories">
            <!-- Stories 1 -->
            <div class="stories-img color">
                <img src="img/profile.jpg" alt="">
                <div class="add">+</div>
            </div>
             <!-- Stories 2 -->
             <div class="stories-img">
                <img src="img/profile2.jpg" alt="">
            </div>
            <!-- Stories  3 -->
            <div class="stories-img">
                <img src="img/profile3.jpg" alt="">
            </div>
            <!-- Stories 4 -->
            <div class="stories-img">
                <img src="img/profile4.jpg" alt="">
            </div>
            <!-- Stories 5 -->
            <div class="stories-img">
                <img src="img/profile5.jpg" alt="">
            </div>
            <!-- Stories 6 -->
            <div class="stories-img">
                <img src="img/profile6.jpg" alt="">
            </div>
            <!-- Stories 7 -->
            <div class="stories-img">
                <img src="img/profile7.jpg" alt="">
            </div>
            <!-- Stories 8 -->
            <div class="stories-img">
                <img src="img/profile8.jpg" alt="">
            </div>
            <!-- Stories 9 -->
            <div class="stories-img">
                <img src="img/profile9.jpg" alt="">
            </div>
            <!-- Stories 10 -->
            <div class="stories-img">
                <img src="img/profile10.jpg" alt="">
            </div>
        </div>
        <!-- Main Posts -->
        <div class="feed">
            <h1>Feed</h1>
            <div class="feed-text">
                <h2>Latest</h2>
                <span>Popular</span>
            </div>
        </div>
        <!-- Posts -->
        <div class="main-posts">
            <!-- Box 1 -->
            <div class="post-box">
                <img src="img/post1.jpg" alt="">

                <div class="post-info">
                    <div class="post-profile">
                        <div class="post-img">
                            <img src="img/profile10.jpg" alt="">
                        </div>
                        <h3>Marques B</h3>
                    </div>
                    <div class="likes">
                        <i class="ri-heart-line"></i>
                        <span>84.4k</span>
                        <i class="ri-chat-3-line"></i>
                        <span>88</span>
                    </div>
                </div>
            </div>
<!-- Box 2 -->
<div class="post-box">
    <img src="img/post2.jpg" alt="">

    <div class="post-info">
        <div class="post-profile">
            <div class="post-img">
                <img src="img/profile9.jpg" alt="">
            </div>
            <h3>Marques B</h3>
        </div>
        <div class="likes">
            <i class="ri-heart-line"></i>
            <span>84.4k</span>
            <i class="ri-chat-3-line"></i>
            <span>88</span>
        </div>
    </div>
</div>
<!-- Box 3 -->
<div class="post-box">
    <img src="img/post3.jpg" alt="">

    <div class="post-info">
        <div class="post-profile">
            <div class="post-img">
                <img src="img/profile5.jpg" alt="">
            </div>
            <h3>Marques B</h3>
        </div>
        <div class="likes">
            <i class="ri-heart-line"></i>
            <span>84.4k</span>
            <i class="ri-chat-3-line"></i>
            <span>88</span>
        </div>
    </div>
</div>
        </div>

    </div>
</body>
</html>
CSS Code
/* Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,100&display=swap");
* {
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
  text-decoration: none;
}
body {
  background: #f8f8f8;
}
:root {
  --gradient: linear-gradient(to right, #e2336b, #fcac46);
}
.sidebar {
  position: fixed;
  width: 300px;
  height: 100vh;
  background: #f8f8f8;
  padding: 20px;
}
.main-home {
  position: absolute;
  width: calc(100% - 300px);
  min-height: 100vh;
  top: 0;
  left: 300px;
  background: #fff;
  border-radius: 1rem 0 0 1rem;
  z-index: 1000;
}
.logo img {
  width: 140px;
}
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 1.4rem;
}
.profile-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid #e2336b;
}
.profile-img img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 50%;
  object-position: center;
}
.name {
  display: flex;
  align-items: center;
  margin: 1rem 0 0.4rem;
}
.name h1 {
  font-size: 1.1rem;
}
.name img {
  margin-left: 4px;
  width: 20px;
  object-fit: contain;
}
.profile-img span {
  font-size: 0.938rem;
  font-weight: 400;
}
.about {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}
.box {
  text-align: center;
}
.box h3 {
  font-size: 1rem;
  font-weight: 500;
}
.box span {
  font-size: 0.938rem;
  font-weight: 400;
}
.menu a {
  width: 100%;
  font-size: 1rem;
  color: #000;
  display: flex;
  align-items: center;
  line-height: 40px;
}
.menu a:hover,
.menu .active {
  color: #e2336b;
}
.menu .icon {
  margin-right: 1rem;
  font-size: 20px;
}
.menu a:hover::before,
.menu .active::before {
  content: "";
  position: absolute;
  right: 0;
  width: 2px;
  height: 17px;
  background: #e2336b;
}
/* Main Home */
.main-home {
  padding: 20px;
  overflow: hidden;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.search {
  display: flex;
  align-items: center;
  background: #f8f8f8;
  width: 200px;
  height: 2.4rem;
  padding: 10px;
  border-radius: 10px;
}
.search input {
  border: none;
  outline: none;
  background: transparent;
  margin-left: 7px;
}
.search o {
  font-size: 20px;
}
.header-content {
  display: flex;
  align-items: center;
}
.header-content i {
  color: #000;
  font-size: 20px;
  margin-left: 1rem;
}
.header-content .btn {
  display: flex;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: var(--gradient);
  margin-left: 1rem;
}
.header-content .btn i {
  color: hsla(0, 0%, 100%, 0.6);
  margin-right: 10px;
}
.btn-text {
  color: #fff;
}
.stories-title {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}
.stories-title h1 {
  font-size: 1.8rem;
}
.stories-title .btn {
  display: flex;
  align-items: center;
  color: #000;
}
.stories-title .btn i {
  font-size: 24px;
  margin-right: 10px;
}
.stories {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
}
.stories-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid #e2336b;
}
.stories-img img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 50%;
  object-position: center;
}
.stories-img.color {
  border: 2px solid #dbdbdb;
}
.stories-img .add {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  color: #fff;
  background: hsla(246, 100%, 67%, 0.7);
}
.feed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}
.feed h1 {
  font-size: 1.7rem;
}
.feed-text {
  display: flex;
  align-items: center;
}
.feed-text h2 {
  font-size: 1rem;
  margin-right: 1rem;
}
.main-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, auto));
  gap: 11px;
}
.post-box {
  width: 300px;
}
.post-box img {
  width: 100%;
  height: 344px;
  object-fit: cover;
  border-radius: 0.5rem;
}
.post-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.post-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border: 2px solid #e2336b;
  border-radius: 50%;
}
.post-img img {
  width: 27px;
  height: 27px;
  object-fit: cover;
  border-radius: 50%;
  object-position: center;
}
.post-profile {
  display: flex;
  align-items: center;
}
.post-profile h3 {
  font-size: 12px;
  font-weight: 600px;
  margin-left: 5px;
}
.likes {
  display: flex;
  align-items: center;
}
.likes i {
  font-size: 20px;
  margin-left: 10px;
}
.likes span {
  font-size: 14px;
  margin-left: 7px;
}
Download Files: 

Comments

Contact Form

Send