Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gh branches #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Please contact me if you have any questions. This is my work on the css_layout exercises.
22 changes: 16 additions & 6 deletions display-exercise.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Layout Exercises | display property</title>
<meta charset="utf-8" name="description" content="Layout exercise on `display` property for Thinkful's front end web development course">
<title>CSS Layout Exercises | position property</title>
<meta charset="utf-8" name="description" content="Layout exercise on `position` property for Thinkful's front end web development course">

<!-- fonts -->
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">

<!-- reset -->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.1.1/normalize.min.css">

<!-- styles -->
<!--testing 1,2, 3 -->
<link rel="stylesheet" type="text/css" href="styles/main.css">
<!-- your styles will go in display-page.css -->
<link rel="stylesheet" type="text/css" href="styles/display-page.css">
</head>
<body>
<!-- your HTML here to implement the colored box design -->
<p>Placeholder!</p>
<main>
<div class="box-parent">
<div class='centered'>
<div class='box box_half green'></div>
<div class='box box_half blue'></div>
</div>
<div class='centered'>
<div class='box box_third grey'></div>
<div class='box box_third black'></div>
<div class='box box_third orange'></div>
</div>
</div>
</main>
</body>
</html>
17 changes: 10 additions & 7 deletions position-exercise.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@

<!-- styles -->
<link rel="stylesheet" type="text/css" href="styles/main.css">

<!-- 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 -->
<nav>
<img src="images/icon.png">
<!-- put your nav code in the nav element-->
<nav class="container">
<img src="images/icon.png" class="icon-img">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="display-exercise.html">display</a></li>
Expand All @@ -28,7 +26,12 @@
</nav>

<main>
<!-- Put the HTML you need to accomplish the design -->
<div class="hero-image">
<div class="box">
<img src="images/spacecat.png" class='spacecat'>
<img src="images/spacedog.png" class='spacedog'>
</div>
</div>
</main>
</body>
</html>
</html>
51 changes: 51 additions & 0 deletions styles/display-page.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
main {
font-size: 0;
}


.box-parent {
margin-top: 90px;
margin-left: auto;
margin-right: auto;
width: 800px;
}

.box {
border: 1px solid black;
display: inline-block;
}

.box_half {
width: 50%;
height: 200px;
}

.box_third {
width: 33.33%;
height: 300px;
}

.black {
background-color: black;
border: 1px solid;
}

.green {
background-color: green;
}

.grey {
background-color: grey;
}

.blue {
background-color: blue;
}

.orange {
background-color: orange
}

.centered {
text-align: center;
}
16 changes: 16 additions & 0 deletions styles/float-page.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,19 @@ main {
margin-left: auto;
margin-right: auto;
}


.left, .right {
margin-top: 20px;
margin-bottom: 20px;
}

.left {
float: left;
margin-right: 15px;
}

.right {
float: right;
margin-left: 15px;
}
73 changes: 73 additions & 0 deletions styles/position-page.css
Original file line number Diff line number Diff line change
@@ -1 +1,74 @@
.container {
padding-left: 60px;
padding-right: 60px;
}

nav {
height: 60px;
background-color: grey;
position: fixed;
width: 100%;
}

nav .icon-img {
height: 50px;
margin-top: 5px;
margin-bottom: 5px;
border-radius: 50%;
vertical-align: middle;
border: 1px solid black;
}

nav ul {
display: inline-block;
list-style: none;
}

nav li {
display: inline-block;
}

nav li::after {
content: "|";
margin-left: 5px;
}

nav a:hover {
color: black;
}

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

main {
padding-top: 90px;
min-width: 1000px;
}

.box {
margin-top: 150px;
width: 600px;
height: 300px;
position: relative;
border: 10px dotted green;
margin-left: auto;
margin-right: auto;
}


.spacecat, .spacedog {
position: absolute;
width: 200px;
}

.spacecat {
top: -90px;
left: -90px;
}

.spacedog {
bottom: -120px;
right: -60px;
}