Skip to content

Instantly share code, notes, and snippets.

@clhenrick
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clhenrick/2ea4f7c08d7ef96279bb to your computer and use it in GitHub Desktop.
Save clhenrick/2ea4f7c08d7ef96279bb to your computer and use it in GitHub Desktop.
mfa dt bootcamp web class css positioning example 1: static
<!DOCTYPE html >
<html>
<!-- Credit:These positioning examples are credited to Noah Stokes' blog post on A List Apart, CSS positioning 101: http://alistapart.com/article/css-positioning-101
-->
<head>
<meta charset="utf-8">
<title>Boxes positioned static</title>
<style>
body{
height: 100%;
width: 100%;
}
.box {
width: 200px;
height: 200px;
position: static;
}
#box_1 {
background: #ee3e64;
}
#box_2 {
background: #44accf;
}
#box_3 {
background: #b7d84b;
}
</style>
</head>
<body>
<h1>3 boxes positioned static</h1>
<h3>Each box is 200px by 200px and falls within the normal flow.</h3>
<div id="box_1" class="box"></div>
<div id="box_2" class="box"></div>
<div id="box_3" class="box"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment