-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathpositioning.html
More file actions
74 lines (55 loc) · 2.25 KB
/
positioning.html
File metadata and controls
74 lines (55 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Building Your Own Style Sheets</title>
<link rel="stylesheet" href="/vendor/stylesheets/normalize.css">
<link rel="stylesheet" href="/assets/stylesheets/global.css">
<link rel="stylesheet" href="/assets/stylesheets/nav.css">
<link rel="stylesheet" href="/assets/stylesheets/colors.css">
<link rel="stylesheet" href="/assets/stylesheets/positioning.css">
</head>
<body>
<!-- Nav -->
<nav id="main-nav">
<ul class="clearfix">
<li><a href="/">Home</a></li>
<li><a href="/basics.html">Basics</a></li>
<li><a href="/box_model.html">Box Model</a></li>
<li><a href="/positioning.html">Positioning</a></li>
<li><a href="/fonts.html">Fonts</a></li>
<li><a href="/backgrounds.html">Backgrounds</a></li>
<li><a href="/lists.html">Lists</a></li>
<li><a href="/media.html">Media</a></li>
<li><a href="/tables.html">Tables</a></li>
<li><a href="/form.html">Form</a></li>
<li><a href="/post.html">Post</a></li>
</ul>
</nav>
<h1>CSS Positioning</h1>
<h2>Clearing Floats</h2>
<div class="clearfix">
<div class="square blue left"></div>
<div class="square blue left"></div>
<div class="square red clear"></div>
</div>
<h2>Floats in a Layout with Positioning</h2>
<header id="main-header" class="orange">Header</header>
<section id="main-content-container" class="clearfix yellow">
<main id="main-content" class="left green">
Main Content
<div id="relatively-positioned-parent" class="orange">
<div class="square white">Static</div>
<div id="relatively-positioned-child" class="purple square">Rel</div>
<div class="square white">Static</div>
<div id="absolutely-positioned-child" class="cyan square">Abs</div>
<div class="square white">Static</div>
<div id="fixed-position-child" class="grey square">Fixed</div>
</div>
</main>
<aside id="sidebar" class="left blue">Sidebar</aside>
</section>
<footer id="main-footer" class="red">Footer</footer>
</body>
</html>