Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion display-exercise.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@
</head>
<body>
<!-- your HTML here to implement the colored box design -->
<p>Placeholder!</p>
<main>
<div class = "top">
<div class = "green"></div>
<div class = "blue"></div>
</div>
<div class = "bottom">
<div class = "grey"></div>
<div class = "black"></div>
<div class = "orange"></div>
</div>
</main>
</body>
</html>
7 changes: 7 additions & 0 deletions position-exercise.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

<!-- your styles go in position-page.css -->
<link rel="stylesheet" type="text/css" href="styles/position-page.css">

</head>
<body>
<!-- To finish the design, the HTML for the nav requires no additional elements, just the right CSS -->
Expand All @@ -29,6 +30,12 @@

<main>
<!-- Put the HTML you need to accomplish the design -->
<div class = "rectangle">
<div class = "cat"></div>
<div class = "dog"></div>
</div>


</main>
</body>
</html>
54 changes: 54 additions & 0 deletions styles/display-page.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
main {
padding-top: 50px;
position: center;
width: 800px;
height: 500px;
font-size: 0;
margin-left: auto;
margin-right: auto;
margin-top: auto;

}

.green{
background-color: green;
display: inline-block;
width: 50%;
height: 200px;
border: 1px solid black;
}

.blue{
background-color: blue;
display: inline-block;
width: 50%;
height: 200px;
border: 1px solid black;
}

.grey{
display: inline-block;
background-color: grey;
width:33.33%;
height: 300px;
border: 1px solid black;

}

.black{
display: inline-block;
background-color: black;
width: 33.33%;
height: 300px;
border: 1px solid black;

}

.orange{
display: inline-block;
background-color: orange;
width: 33.33%;
height: 300px;
border: 1px solid black;

}
90 changes: 90 additions & 0 deletions styles/position-page.css
Original file line number Diff line number Diff line change
@@ -1 +1,91 @@
nav{
padding: 10px;
text-align: left;
padding-left: 60px;
padding-right: 60px;
position: absolute;
background-color: grey;
height: 10%;
width: 100%;
}

nav ul{
display: inline-block;
text-align: left;
padding-left: 63px;
position: absolute;

}

nav ul li{
display: inline-block;
font-size: 12px;
vertical-align: center;

}

nav ul li::after{
content: " | ";

}

nav img{
display: inline-block;
border-radius: 100px;
height: 70%;
vertical-align: center;
border: 1px solid black;
position: absolute;
}

body{
background: url(../images/outerspace_landscape.jpeg) no-repeat;
background-size: cover;
}

main{
padding-top: 200px;
width: fill;
height: fill;

}

.rectangle{
display: block;
border: 10px green dotted;
width: 600px;
height: 300px;
position: relative;
margin-left: auto;
margin-right: auto;
margin-top: auto;
margin-bottom: auto;

}

.cat{
display: block;
background: url(../images/spacecat.png) no-repeat;
background-size: cover;
width: 200px;
height:200px;
position: relative;
margin-left: -100px;
margin-right: auto;
margin-top: -100px;
margin-bottom: auto;
}

.dog{
display: block;
background: url(../images/spacedog.png) no-repeat;
background-size: cover;
width: 200px;
height:200px;
position: relative;
margin-left: auto;
margin-right: -100px;
margin-top: auto;
margin-bottom: -100px;
}