Skip to content

Commit

Permalink
adds absolute example
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronwp committed Aug 17, 2016
1 parent 973b9bf commit 37ae420
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions fend-refresh/lesson6/absolute-fixed-flow/absolute-example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Absolute Example</title>
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro' rel='stylesheet' type='text/css'>
<style>
* {
box-sizing: border-box;
font-family: 'Source Sans Pro', sans-serif;
font-weight: bold;
}
div {
display: inline-block;
border: 2px solid #2e3d49;
width: 200px;
height: 100px;
}
div:nth-child(even) {
background-color: #ecc81a;
}
div:nth-child(odd) {
background-color: #02b3e4;
}
.absolute {
position: absolute;
top: 50px;
left: 50px;
}
</style>
</head>
<body>
<div></div>
<div></div>
<div class="absolute">Absolute
<div class="absolute">Absolute child of absolute</div>
</div>
<div></div>
</body>
</html>

0 comments on commit 37ae420

Please sign in to comment.