-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhtml5-nav.html
More file actions
98 lines (94 loc) · 3.36 KB
/
html5-nav.html
File metadata and controls
98 lines (94 loc) · 3.36 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!-- Listing 1-6a. Inserting a 3D Navigation Menu Using the <nav> tag (html5-nav.html) -->
<!DOCTYPE html>
<html lang="en">
<head>
<title>The nav tag</title>
<meta charset=utf-8>
<link rel="stylesheet" type="text/css" href="nav-style.css">
<!--[if lte IE 8]>
<script src="html5.js"></script>
<![endif]-->
</head>
<body>
<div id=”container”>
<header>
<h1>header goes here</h1>
</header>
<nav>
<ul>
<li><a href="#" title="Page 2">Page Two</a></li>
<li><a href="#" title="Page 3">Page Three</a></li>
<li><a href="#" title="Page 4">Page Four</a></li>
<li><a href="#" title="Home page">Home Page</a></li>
</ul>
</nav>
<div id="content">
<article>
<strong>Article<br></strong>
From a local newspaper:
<p><strong>Are you -illiterate?</strong><br>
Write today for a <strong>Free</strong> course. -<br>
Easy payment terms.
</p>
</article>
<article>
<strong>Another Article</strong><br>
Poster in store window:
<p><strong>Stock up for Christmas</strong><br>
Limited to one per family.<br>
Free Delivery £2
</p>
</article>
<article>
<strong>Another Article</strong><br>
Mark Twain said:"Life is one -darn thing after another"
<p> So true, but we can still laugh about it</p>
</article>
</div>
</div>
<footer>
<strong>Footer goes here</strong>
</footer>
</body>
</html>
<!--
Listing 1-6b provides the CSS presentation for the navigation menu
Listing 1-6b. Using the <nav> Tag in the CSS for Listing 1-6a (nav-style.css) -->
/*
#container { width:780px; margin:auto;
}
#content { width:640px; margin-left:140px;
}
header, nav, footer, article, section { display:block;
}
header { width:780px; background-color:#FF9966; text-align:center; -
margin:5px auto 10px auto; padding:2px;
}
article { float:left; width:190px; margin:0 0 0 10px; padding:6px;
}
footer { clear:both; background-color:#FF9966; text-align:center; -
width:780px; margin:auto;
}
p { margin-top:5px; margin-bottom:5px;
} */
/* set navigation menu position and style*
nav { float:left; width:130px; background-color : white; margin: 0 7px 5px -30px;
}
nav ul {float:left; width:130px;}
/* set general side button styles *
nav li { margin-bottom: 3px; text-align: center; list-style-type:none; width:125px;}
/* set general anchor styles *
nav li a { display: block; color: white; font-weight: bold; -
text-decoration: none } */
/* specify state styles */
/* mouseout (default) *
nav li a { background:#946055; color: white; border: 5px outset #C96E6B;}
/* mouseover *
nav li a:hover { background: #9F7562; border: 5px outset #C96E6B;}
/* onmousedown *
nav li a:active { background:maroon; border: 5px inset maroon }
}
*/