| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
In this project you will be re-creating multiple html templates using the HTML and CSS skills you have learned so far. There will be 3 levels of difficulty, each being a template and having its own steps to get to the end solution. In each step you will be given a jpeg image that you will need to re-create. Each step will be a continuation of the previous. The goal is to get your project to look as close as you can to the design of the images provided. Good luck!
In this step, we will create a webpage that has the same structure and styling as the level-1/step-1/step-1.jpg image. We will accomplish this by adding some css styles to our webpage.
In this step, we will position the header at the top of the page.
In this step, we will try to move box with a class of content-left to the left side of the page.
.content-left{
width: 33.3%;
<!-- this height is a placeholder. You will need to make some adjustments to get this container to look like the design -->
height: 100px;
background: #565555;
float: left;
padding-top: 35px;
}In this step, we are going to position the box with a class of content-mid to line up directly to the right of .content-left.
.content-mid {
width: 66.3%;
<!-- this height is a placeholder. You will need to make some adjustment to get this container to look like the design -->
height: 100px;
background: #B0B0B0;
float: left;
}In this step, we will position the footer at the bottom of the page.
.footer {
width: 100%;
height: 100px;
background: #3A3A3A;
position: absolute;
bottom: 0;
}.header {
width: 100%;
height: 100px;
background: #D8D8D8;
}
.content-left {
width: 33.3%;
height: 76vh;
padding-top: 35px;
float: left;
background: #565555;
}
.content-mid {
width: 66.66%;
height: 76vh;
float: left;
background: #B0B0B0;
}
.footer {
width: 100%;
height: 100px;
background: #3A3A3A;
position: absolute;
bottom: 0;
}In this step, we will create a webpage that has the same structure and styling as the level-1/step-2/step-2.jpg image. We will accomplish this by adding more css styles to our webpage.
In this step, we will add the first box in the content-left container.
.profile-image-container {
width: 80%;
height: 180px;
margin: auto;
background: #96F0F2;
}In this step, we will add the second box in the content-left container.
.profile-links-container {
width: 80%;
height: 300px;
margin: 20px auto;
background: #12F3F7;
}In this step, we will add the rectangle in the header and position in correctly to the left side of the webpage.
.logo-container {
width: 26%;
height: 60px;
float: left;
margin-left: 30px;
margin-top: 20px;
background: #4F4949;
}In this step, we will add the square in the header and position in correctly to the right side of the webpage.
.menu-container {
width: 60px;
height: 60px;
float: right;
margin-right: 10px;
margin-top: 20px;
background: #4F4949;
}.logo-container {
width: 26%;
height: 60px;
float: left;
margin-left: 30px;
margin-top: 20px;
background: #4F4949;
}
.menu-container {
width: 60px;
height: 60px;
float: right;
margin-right: 10px;
margin-top: 20px;
background: #4F4949;
}
.profile-image-container {
width: 80%;
height: 180px;
margin: auto;
background: #96F0F2;
}
.profile-links-container {
width: 80%;
height: 300px;
margin: 20px auto;
background: #12F3F7;
}In this step, we will update our webpage so that it has the same structure and styling as the level-1/step-3/step-3.jpg image. We will accomplish this by adding more css styles to our webpage.
In this step we will start making the content in the .mid-content div by adding a header to it.
.content-mid-header {
background: #444;
height: 100px;
}In this step we will add some text inside of our .content-left div.
<div class="content">
<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem
accusantium doloremque laudantium, totam rem aperiam, Sed ut perspiciatis unde omnis iste natus error sit voluptatem
accusantium doloremque laudantium, totam rem aperiam, </p>
</div>In this step, we will fix the alignment and positioning of the text we added in the previous step.
.content {
padding: 50px;
text-align: center;
height: 275px;
}In this step, we will changing the size of the container that is housing the content we added in the previous two steps.
.content-container {
background: #D8D8D8;
width: 80%;
margin: 40px auto;
}.content-mid-header {
height: 100px;
background: #444;
}
.content-container {
width: 80%;
margin: 40px auto;
background: #D8D8D8;
}
.content {
height: 275px;
padding: 50px;
text-align: center;
}In this step, we will also be re-creating an image that will be provided to you. We will accomplish this by adding some css styles to our webpage. Good luck!
In this step, we will be giving the div with a class of .main-top-section a position property that will allow its future child elements to change their position according to it.
.main-top-section {
width: 100%;
height: 375px;
background: #F7F1E7;
position: relative;
}In this step, we will be positioning the small menu box in the left hand side of the level-2-step-1.jpg image.
.menu {
width: 100px;
height: 40px;
background: #536A63;
display: inline-block;
position: absolute;
left: 10px;
top: 10px;
}
.logo {
width: 300px;
height: 40px;
margin-top: 10px;
background: #536A63;
display: inline-block;
}
.sign-in {
width: 100px;
height: 40px;
background: #536A63;
display: inline-block;
position: absolute;
right: 10px;
top: 10px;
}In this step, we will position the last green element overhanging below its parent element.
.bottom-container {
width: 60%;
height: 60px;
position: absolute;
bottom: -30px;
left: 22%;
background: #536A63;
}.main-top-section {
width: 100%;
height: 375px;
background: #F7F1E7;
position: relative;
}
.top-header {
width: 100%;
height: 70px;
text-align: center;
background: #D8D8D8;
}
.menu {
width: 100px;
height: 40px;
display: inline-block;
position: absolute;
left: 10px;
top: 10px;
background: #536A63;
}
.logo {
width: 300px;
height: 40px;
display: inline-block;
margin-top: 10px;
background: #536A63;
}
.sign-in {
width: 100px;
height: 40px;
display: inline-block;
position: absolute;
right: 10px;
top: 10px;
background: #536A63;
}
.bottom-container {
width: 60%;
height: 60px;
position: absolute;
bottom: -30px;
left: 22%;
background: #536A63;
}In this step, we will also be re-creating an image that will be provided to you. We will accomplish this by adding some css styles to our webpage. Good luck!
In this step, we will be using a css property to align items in the center of the webpage.
.main-bottom-section {
margin-top: 65px;
text-align: center;
}In this step, we will be adding a width, height and display property to make the small square containers look like the level-2-step-2.jpg image.
.item {
display: inline-block;
height: 200px;
width: 40%;
background: #DED6D3;
margin-bottom: 30px;
}In this step, we will be adding a width, height and a margin property to make the rectangle container look like the level-2-step-2.jpg image.
.full-width-item {
width: 80%;
height: 200px;
margin:0 auto 30px;
background: #DED6D3;
}In this step, we will add a height, width and a margin to make the big square look like the level-2-step-2.jpg image.
.large-item {
width: 80%;
height: 500px;
margin:0 auto 30px;
background: #DED6D3;
}.main-bottom-section {
margin-top: 65px;
text-align: center;
}
.item {
display: inline-block;
height: 200px;
width: 40%;
background: #DED6D3;
margin-bottom: 30px;
}
.full-width-item {
width: 80%;
height: 200px;
margin:0 auto 30px;
background: #DED6D3;
}
.large-item {
width: 80%;
height: 500px;
margin:0 auto 30px;
background: #DED6D3;
}In this step, we will be adding the images and logos to the layout designs that we made in the previous two levels. We'll be combining them to create a one big design. Have fun!
In this step, we will be adding a background image to the main-top-section.
.main-top-section {
width: 100%;
height: 530px;
position: relative;
background: url("../img/Background.png") no-repeat;
background-size: cover;
}In this step, we will be adding the src path on each of the images in the top half of the webpage.
<img class="menu-icon" src="../img/icons/MENU.png" alt="menu icon"><img class="logo-icon" src="../img/icons/dev-shop.png" alt="logo icon"><img class="sign-in-icon" src="../img/icons/Sign_In.png" alt="sign in icon"><img class="shop-icon" src="../img/icons/Shop_Deals.png" alt="shop icon"><section class="main-top-section">
<header class="top-header">
<div class="menu">
<!-- Step-1.2 add the path to the menu image on the src attribute -->
<img class="menu-icon" src="../img/icons/MENU.png" alt="menu icon">
</div>
<div class="logo">
<!-- Step-1.3 add the path to the dev-shop image on the src attribute -->
<img class="logo-icon" src="../img/icons/dev-shop.png" alt="logo icon">
</div>
<div class="sign-in">
<!-- Step-1.4 add the path to the sign-in image on the src attribute -->
<img class="sign-in-icon" src="../img/icons/Sign_In.png" alt="sign in icon">
</div>
</header>
<div class="bottom-container">
<!-- Step-1.5 add the path to shop-deals image on the src attribute -->
<img class="shop-icon" src="../img/icons/Shop_Deals.png" alt="shop icon">
</div>
</section>In this step, we will continue to add the images and logos to the layout designs that we made in the previous two levels. We'll be combining them to create a one big design. Good luck!
In this step, we will be adding the src path on each of the images in the bottom half of the webpage.
<img class="item-image" src="../img/Tops.png" alt="tops"><img class="item-image" src="../img/bottoms.png" alt="tops"><img class="item-image" src="../img/accessories.png" alt="tops"><img class="item-image" src="../img/collection.png" alt="tops"><img class="item-image" src="../img/kicks.png" alt="tops"><img class="item-image" src="../img/hats.png" alt="tops"><section class="main-top-section">
<header class="top-header">
<div class="menu">
<!-- Step-1.2 add the path to the menu image on the src attribute -->
<img class="menu-icon" src="../img/icons/MENU.png" alt="menu icon">
</div>
<div class="logo">
<!-- Step-1.3 add the path to the dev-shop image on the src attribute -->
<img class="logo-icon" src="../img/icons/dev-shop.png" alt="logo icon">
</div>
<div class="sign-in">
<!-- Step-1.4 add the path to the sign-in image on the src attribute -->
<img class="sign-in-icon" src="../img/icons/Sign_In.png" alt="sign in icon">
</div>
</header>
<div class="bottom-container">
<!-- Step-1.5 add the path to shop-deals image on the src attribute -->
<img class="shop-icon" src="../img/icons/Shop_Deals.png" alt="shop icon">
</div>
</section>In this step, we will be giving our page a little taste of responsiveness. We will be making our images stop growing at a certain screen width. Lets begin!
@media(min-width: 900px) {
.item {
width:400px;
}
.full-width-item {
width: 800px;
}
.large-item {
width: 800px;
}
}<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>level-3</title>
<link rel="stylesheet" href="../base/base.css">
<meta author="Ben Callis">
<!-- STEP 1 CSS FILE **** STEP 1 CSS FILE *** STEP 1 CSS FILE -->
<!-- <link rel="stylesheet" href="step-1/step-1.css"> -->
<!-- STEP 2 CSS FILE **** STEP 2 CSS FILE *** STEP 2 CSS FILE -->
<!-- <link rel="stylesheet" href="step-2/step-2.css"> -->
<!--<!– STEP 3 CSS FILE WHEN YOU GET THIS FAR COMMENT OUT step-2.css and step-1.css AND JUST WORK OF THIS FILE –>-->
<link rel="stylesheet" href="step-3/step-3.css">
</head>
<body>
<main class="main-wrapper">
<!-- Step-1.1 add a background image that take up the entire width of container -->
<section class="main-top-section">
<header class="top-header">
<div class="menu">
<!-- Step-1.2 add the path to the menu image on the src attribute -->
<img class="menu-icon" src="./img/icons/MENU.png" alt="menu icon">
</div>
<div class="logo">
<!-- Step-1.3 add the path to the dev-shop image on the src attribute -->
<img class="logo-icon" src="./img/icons/dev-shop.png" alt="logo icon">
</div>
<div class="sign-in">
<!-- Step-1.4 add the path to the sign-in image on the src attribute -->
<img class="sign-in-icon" src="./img/icons/Sign_In.png" alt="sign in icon">
</div>
</header>
<div class="bottom-container">
<!-- Step-1.5 add the path to shop-deals image on the src attribute -->
<img class="shop-icon" src="./img/icons/Shop_Deals.png" alt="shop icon">
</div>
</section>
<section class="main-bottom-section">
<div class="item tops">
<!-- Step-2.1 add the path to tops image on the src attribute -->
<img class="item-image" src="./img/Tops.png" alt="tops">
</div>
<div class="item bottoms">
<!-- Step-2.2 add the path to bottoms image on the src attribute -->
<img class="item-image" src="./img/bottoms.png" alt="tops">
</div>
<div class="full-width-item accessories">
<!-- Step-2.3 add the path to accessories image on the src attribute -->
<img class="item-image" src="./img/accessories.png" alt="tops">
</div>
<div class="large-item">
<!-- Step-2.4 add the path to collection image on the src attribute -->
<img class="item-image" src="./img/collection.png" alt="tops">
</div>
<div class="item kicks">
<!-- Step-2.5 add the path to kicks image on the src attribute -->
<img class="item-image" src="./img/kicks.png" alt="tops">
</div>
<div class="item hats">
<!-- Step-2.6 add the path to hats image on the src attribute -->
<img class="item-image" src="./img/hats.png" alt="tops">
</div>
</section>
</main>
</body>
</html>.main-top-section {
width: 100%;
height: 530px;
position: relative;
background: url("../img/Background.png") no-repeat;
background-size: cover;
}
.top-header {
width: 100%;
padding-top: 10px;
height: 70px;
text-align: center;
}
.menu {
width: 100px;
height: 40px;
display: inline-block;
position: absolute;
left: 10px;
top: 20px;
}
.menu-icon {
width: 60%;
}
.logo {
width: 300px;
height: 40px;
display: inline-block;
margin-top: 10px;
}
.logo-icon {
width: 75%;
}
.sign-in {
width: 100px;
height: 40px;
display: inline-block;
position: absolute;
right: 10px;
top: 30px;
}
.sign-in-icon {
width: 60%;
}
.bottom-container {
width: 100%;
height: 60px;
position: absolute;
text-align: center;
bottom: -30px;
}
.shop-icon {
width: 350px;
}
.main-bottom-section {
margin-top: 65px;
text-align: center;
}
.item {
display: inline-block;
width: 40%;
background: #D6CFC9;
margin-bottom: 20px;
padding-top: 20px;
cursor: pointer;
}
.item-image {
width: 100%;
display: block;
}
.full-width-item {
width: 80%;
margin:0 auto 20px;
cursor: pointer;
}
.large-item {
width: 80%;
margin:0 auto 20px;
cursor: pointer;
}
@media(min-width: 900px) {
.item {
width:400px;
}
.full-width-item {
width: 800px;
}
.large-item {
width: 800px;
}
}If you see a problem or a typo, please fork, make the necessary changes, and create a pull request so we can review your changes and merge them into the master repo and branch.
© DevMountain LLC, 2016. Unauthorized use and/or duplication of this material without express and written permission from DevMountain, LLC is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to DevMountain with appropriate and specific direction to the original content.
| Back | FazBrowse Home | New Git URL |