<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Profile</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<div class="cover-photo">
<img src="cover-photo.jpg" alt="Cover Photo">
</div>
<div class="profile-row">
<div class="col">
<div class="user-image">
<img src="user-photo.jpg" alt="User Photo">
</div>
<div class="user-info">
<h1>User Name</h1>
<p>@username</p>
</div>
</div>
<div class="col">
<div class="followers">
<h2>Followers</h2>
<p>1000</p>
</div>
</div>
<div class="col">
<div class="following">
<h2>Following</h2>
<p>200</p>
</div>
</div>
<div class="col">
<div class="posts">
<h2>Posts</h2>
<p>50</p>
</div>
</div>
</div>
</div>
</body>
</html>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
box-sizing: border-box;
}
.container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
.cover-photo {
width: 100%;
height: 200px;
overflow: hidden;
position: relative;
}
.cover-photo img {
width: 100%;
height: auto;
object-fit: cover;
}
.profile-row {
display: flex;
justify-content: space-between;
margin-top: -50px;
}
.col {
width: 23%;
background-color: white;
border: 1px solid #ddd;
padding: 20px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
border-radius: 8px;
text-align: center;
}
.user-image {
width: 100px;
height: 100px;
overflow: hidden;
border-radius: 50%;
margin: 0 auto;
border: 5px solid white;
position: relative;
top: -50px;
}
.user-image img {
width: 100%;
height: 100%;
object-fit: cover;
}
.user-info {
margin-top: -40px;
}
h1, h2, p {
margin: 10px 0;
}
h1 {
font-size: 24px;
}
h2 {
font-size: 18px;
color: #555;
}
p {
font-size: 16px;
color: #888;
}