Skip to content

Instantly share code, notes, and snippets.

@solanoize
Last active March 13, 2023 14:25
Show Gist options
  • Select an option

  • Save solanoize/3c71f5c4468e3d8a6670c6423fe71229 to your computer and use it in GitHub Desktop.

Select an option

Save solanoize/3c71f5c4468e3d8a6670c6423fe71229 to your computer and use it in GitHub Desktop.
* {
box-sizing: border-box;
margin: 0;
font-family: Arial, Helvetica, sans-serif;
padding: 0;
}
body {
/* background-color: rgb(44, 44, 44); */
}
.profile {
display: flex;
justify-content: space-around;
margin: 0 auto;
padding-top: 20px;
padding-bottom: 50px;
min-width: 600px;
max-width: 800px;
}
.profile > .photo > img {
border-radius: 100%;
margin: 10px;
border: 5px solid rgb(237, 237, 237);
}
.profile > .info {
display: flex;
flex-direction: column;
padding: 10px;
/* background-color: aqua; */
}
.profile > .info > * {
padding-bottom: 10px;
}
.profile > .info > .brand {
display: flex;
align-items: center;
}
.profile > .info > .brand span {
font-weight: 700;
font-size: 2em;
}
.profile > .info > .brand button {
margin-left: 20px;
padding: 5px 30px;
border: 2px solid rgb(91, 154, 255);
border-radius: 4px;
background-color: transparent;
font-size: 1em;
}
.profile .about a {
text-decoration: none;
color: rgb(91, 154, 255);
}
.profile .socials span {
margin-right: 15px;
}
.column > img {
width: 30.333%;
margin-top: 25px;
margin-right: 25px;
}
img:active {
box-shadow: 1px 1px 5px gray;
}
.row {
display: flex;
flex-wrap: wrap;
padding: 0 15px;
margin-bottom: 20px;
}
.column {
display: flex;
flex-wrap: wrap;
justify-content: center;
padding: 0 10px;
}
@media (max-width: 600px) {
.profile {
flex-direction: column;
justify-content: center;
align-items: center;
min-width: 100vw;
}
.profile > .photo {
display: flex;
justify-content: center;
}
.profile > .photo > img {
width: 50%;
}
.profile > .info {
justify-content: center;
padding: 10px;
}
.profile > .info > .brand {
display: flex;
justify-content: center;
flex-direction: column;
}
.profile > .info > .brand > button {
display: block;
margin-top: 10px;
}
.profile .about {
text-align: center;
}
.profile .socials span {
margin: 0;
text-align: center;
}
.row {
justify-content: center;
}
.column {
display: flex;
width: 100% !important;
flex-direction: column;
align-items: center;
}
.column img {
width: 100%;
}
}
<!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">
<link rel="stylesheet" href="statics/index.css">
<title>Responsive Web Design</title>
</head>
<body>
<div class="profile">
<div class="photo">
<img src="https://picsum.photos/200/200?random=4" alt="" class="photo-profile">
</div>
<div class="info">
<div class="brand">
<span>Nike</span>
<button>Follow</button>
</div>
<div class="about">
nike Just Do It. <a href="#">www.nike.com</a>
</div>
<div class="socials">
<span>
<strong>789</strong> posts
</span>
<span>
<strong>16.7m</strong> followers
</span>
<span>
<strong>129</strong> following
</span>
</div>
</div>
</div>
<div class="row">
<div class="column">
<img src="https://picsum.photos/1080/1080?random=1" />
<img src="https://picsum.photos/1080/1080?random=2" />
<img src="https://picsum.photos/1080/1080?random=3" />
<img src="https://picsum.photos/1080/1080?random=4" />
<img src="https://picsum.photos/1080/1080?random=5" />
<img src="https://picsum.photos/1080/1080?random=6" />
<img src="https://picsum.photos/1080/1080?random=7" />
<img src="https://picsum.photos/1080/1080?random=8" />
<img src="https://picsum.photos/1080/1080?random=9" />
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment