-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgallery-page-validated.html
More file actions
220 lines (178 loc) · 7.06 KB
/
gallery-page-validated.html
File metadata and controls
220 lines (178 loc) · 7.06 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<!-- Listing 2-6a. Creating a Three Column Rollover Gallery with HTML5 Validation Logo (gallery-page-validated.html) -->
<!DOCTYPE html>
<html lang="en">
<head>
<title>Complete Gallery page</title>
<meta charset=utf-8>
<link rel="stylesheet" type="text/css" href="gallery-page-HTML5.css">
<style>
<!-- Listing 2-6b provides the CSS presentation instructions for a 3 column gallery set in a real world page.
Listing 2-6b. The CSS Style Sheet for Listing 2-6a (gallery-page.css) -->
/*set attributes for consistent appearance in all browsers*/
html, body, p, ul, li, h1, h2 { margin:0; padding:0;
}
/*set images to have no borders*/
img { border:0;
}
/*add display attributes for the semantic tags*/
header, footer, section, article, nav { display:block;
}
/*SET FONTS*/
span.small { font-size:small;
}
h1 { font-size:x-large; font-family:"times new roman"; text-align:center;
}
h2 {font-size:large; font-family:"times new roman"; text-align:center;
}
/*PAGE LAYOUT*/
body {margin:auto; width:970px;
}
header { width:970px;
}
nav { float:left; margin-left:10px; width:115px;
}
nav ul { margin-left:0; border:0; width:115px;
}
/*set far right column for ads*/
#rightcol { width:150px; float:right; text-align:center;
}
#rightcol p.advert {font-size:small; margin-top:190px;
}
/*set middle column for main content*/
#midcol { margin-left:135px; margin-right:155px;
}
/*set gallery block position*/
#gallery-block { position:relative; left: 30px; top:10px;
}
/*set footer*/
footer { clear:both; color:black; text-align:center; width:970px;
}
.clear { clear:both;
}
/*set menu buttons*/
li.btn a { display:block; background-color :#66CCFF; color:black; font-weight:bold; -
padding:4px; margin-left:0; text-align:center; list-style-type:none; -
text-decoration:none; width:110px;
}
li.btn a:hover { background-color:blue; color:white;
}
li.btn { width:110px;
}
/*SET THUMBNAIL GALLERY BLOCK*/
/* Set general thumbnail styles */
#col-1 { position: absolute; top: 0; left: 0; width:85px;
}
/*place the first column on the page*/
li { margin: 5px; list-style-type:none;
}
/*remove bullets from the un-ordered list elements and create the -
MouseOut state (default) - create and position a space for the larger images and -
hide them*/
#col-1 a img.hid { width: 260px; height:390px; position: -
absolute; top: 10px; left: 330px; visibility: hidden;
}
/* MouseOver state (hover)- this reveals larger picture */
#col-1 a:hover { background: white; }
#col-1 a:hover img.hid { visibility:visible;
}
/*----------------------------------------------------*/
/* set 2nd column of thumbnails 85px further over to right*/
#col-2 { position: absolute; top: 0; left: 85px; width:85px;
}
li { margin: 5px; list-style-type:none;
}
/* MouseOut state (default) - hide larger picture */
#col-2 a img.hid { width: 260px; height:390px; -
position: absolute; top: 10px; left: 245px; margin-left:0;visibility: hidden;
}
/* MouseOver state (hover)- reveal larger picture */
#col-2 a:hover { background: white; }
#col-2 a:hover img.hid { visibility:visible; }
/*----------------------------------------------------*/
/* set 3rd column of thumbnails 170px further over to right*/
#col-3 { position: absolute; top: 0; left: 175px; width:95px; }
li { margin: 5px; list-style-type:none;
}
/* MouseOut state (default) - hide larger picture */
#col-3 a img.hid { width: 260px; height:390px; -
position: absolute; top: 10px; left: 155px; margin-left:0; visibility: hidden;
}
/* MouseOver state (hover)- reveal larger picture */
#col-3a:hover { background: white;
}
#col-3 a:hover img.hid { visibility:visible;
}
</script>
<!--[if lte IE 7]>
<link rel="stylesheet" type="text/css" href="gallery-ie7.css">
<![endif]-->
<!-- conditional Javascript added -->
<!--[if lte IE 8]>
<script src="html5.js" type="text/javascript"></script>
<![endif]-->
</head>
<body>
<header>
<h1>A full page roll-over gallery of greetings, cards, e.t.c.</h1>
<h2>Hover the mouse over a small picture to see an enlarged version</h2>
</header>
<nav>
<ul>
<li class="btn"><a href="gallery-one-col.html">Page Two</a></li>
<li class="btn"><a href="gallery-2col.html">Page Three</a></li>
<li class="btn"><a href="gallery-3col-mix.html">Page Four</a></li>
<li class="btn"><a href="gallery-page-validated.html">gHome Page</a></li>
</ul>
</nav>
<div id="rightcol">
Secondary information<br><br>
<p>
<a href="http://validator.w3.org/check?uri=referer">
<img src="http://www.w3.org/html/logo/img/mark-word-icon.png" width="64" height="64" alt="Validated HTML5" title="Validated HTML5"></a>
</p>
<p>
<a href="http://jigsaw.w3.org/css-validator/"><img src="images/vcss-blue.gif" width="88" height="31" title="Valid CSS!" alt="Valid CSS!"></a>
<span class="small"><br><br>
Markup Validated by the World Wide Web Consortium
</span>
</p>
<br class="clear">
<p class="advert">
Web Design by Orris Baker
</p>
</div>
<div id="midcol">
<div id="gallery-block">
<ul id = "col-1">
<li><a href="#"><img src = "images/alithumb.jpg" alt="Ali" title="Ali">
<img class = "hid" src = "images/alibig.jpg" alt=""></a></li>
<li><a href="#"><img src = "images/catthumb.jpg" alt="Cat" title="Cat">
<img class = "hid" src = "images/catbig.jpg" alt=""></a></li>
<li><a href="#"><img src = "images/beachthumb.jpg" alt="Beach" title="Beach">
<img class = "hid" src = "images/beachbig.jpg" alt=""></a></li>
</ul>
<ul id = "col-2">
<li><a href="#"><img src = "images/fernsthumb.jpg" alt="Ferns" title="Ferns">
<img class = "hid" src = "images/fernsbig.jpg" alt=""></a></li>
<li><a href="#"><img src = "images/nicothumb.jpg" alt="Nico" title="Nico">
<img class = "hid" src = "images/nicobig.jpg" alt=""></a></li>
<li><a href="#"><img src = "images/childbeachthumb.jpg" alt="Child and Beach" -
title="Child and Beach">
<img class = "hid" src = "images/childbeachbig.jpg" alt=""></a></li>
</ul>
<ul id = "col-3">
<li><a href="#"><img src = "images/ancientthumb.jpg" alt="Ancient and modern" -
title="Ancient and Modern">
<img class = "hid" src = "images/ancientbig.jpg" alt=""></a></li>
<li><a href="#"><img src = "images/felixthumb.jpg" alt="Felix" title="Felix">
<img class = "hid" src = "images/felixbig.jpg" alt=""></a></li>
<li><a href="#"><img src = "images/cliffthumb.jpg" alt="Cliffs" title="Cliffs">
<img class = "hid" src = "images/cliffbig.jpg" alt=""></a></li>
</ul><br class="clear">
</div><!--gallery block closed-->
</div><!--midcol closed-->
<footer>
Footer goes here
</footer>
</body>
</html>