Skip to content

Instantly share code, notes, and snippets.

@minhchu
Created September 17, 2021 03:30
Show Gist options
  • Save minhchu/241e2886b6176ff8ead7b26997776f78 to your computer and use it in GitHub Desktop.
Save minhchu/241e2886b6176ff8ead7b26997776f78 to your computer and use it in GitHub Desktop.
HTML + CSS Homework 2
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Minh's Website</title>
<!-- Google fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@200;300;400;600;700&display=swap" rel="stylesheet">
<!-- Fontawesome icons -->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
<style type="text/css">
body {
font-family: 'Nunito', sans-serif;
}
h1 {
margin: 0px;
padding: 0px;
}
p {
margin: 0px;
padding: 0px;
}
a {
text-decoration: none;
}
.main {
background-color: #dedede;
padding: 64px;
}
.avatar {
border-radius: 50%;
width: 128px;
height: 128px;
}
.white-background {
background-color: white;
}
.orange-background {
background-color: #ff5e00;
}
.columns {
display: flex;
flex-direction: row;
}
.column {
width: 50%;
}
.center {
display: flex;
flex-direction: column;
align-items: center;
}
.text-white {
color: white;
}
.left-wrapper {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding-top: 72px;
}
.right-wrapper {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding-top: 64px;
padding-bottom: 64px;
}
.right-text {
margin-top: 32px;
margin-right: 32px;
margin-left: 32px;
line-height: 1.5rem;
}
.name {
font-weight: 600;
font-size: 64px;
margin-top: 16px;
}
.about {
text-align: right;
}
.icons {
margin-top: 32px;
}
i {
font-size: 24px;
margin-left: 8px;
}
</style>
</head>
<body class="main">
<div class="columns">
<div class="white-background column center">
<div class="left-wrapper">
<img class="avatar" src="https://www.svgrepo.com/show/65453/avatar.svg">
<h1 class="name">I'm Minh</h1>
<p>Hanoi, Vietnam</p>
</div>
</div>
<div class="orange-background column center">
<div class="right-wrapper">
<h1 class="text-white">Developer</h1>
<p class="text-white right-text about">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<div class="icons">
<a href="https://www.facebook.com/scsilver/" target="_blank">
<i class="fab fa-facebook-f text-white"></i>
</a>
<a href="#">
<i class="fab fa-twitter text-white"></i>
</a>
<a href="#">
<i class="fab fa-instagram text-white"></i>
</a>
</div>
</div>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment