-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
364 lines (335 loc) · 8.2 KB
/
style.css
File metadata and controls
364 lines (335 loc) · 8.2 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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
/*----------------------------------------------- General Styles -----------------------------------------------*/
body {
min-width: 600px;
margin: 2.5%;
background-color: #E4DFDA;
font-family: 'Roboto Condensed', Arial, sans-serif;
font-size: 1em;
text-align: center;
}
section, footer {
margin: 2em auto;
}
h1 {
font-family: 'Righteous', cursive;
font-size: 2em;
padding: 1.25em 0 0;
clear: both;
}
p {
margin: 2em auto;
padding: 1em 0;
}
section p {
max-width: 900px;
}
.main p {
margin: 0;
padding: 1.5em 0 0;
font-size: 1em;
}
.tall p,
.short p {
margin: 0;
padding: 0;
}
footer p {
clear: both;
padding: 5em 0 2em;
}
span.boxnumber {
font-size: 3em;
display: block;
}
.main {
text-align: center;
margin: 0em auto;
}
article {
display: inline-block;
margin: 0 2em;
}
.tall {
width: 150px;
height: 350px;
padding: 25px;
}
.short {
width: 150px;
height: 150px;
padding: 25px;
}
/*----------------------------------------------- Floating -----------------------------------------------*/
/*----------------------------------------------- Float Sample 1 -----------------------------------------------*/
#floatsample-1 .short-container {
float: left;
}
#floatsample-1 .short,
#floatsample-1 .tall {
width: 105px;
height: 125px;
padding: 5px;
}
#floatsample-1 .tall {
height: 260px;
}
#floatsample-1 .long-container {
padding: 5px;
}
/*TRY COMMENTING OUT THIS WIDTH TO SEE WHAT HAPPENS*/
#floatsample-1 #fs1sample2 {
width: 230px;
}
/*TRY COMMENTING OUT THIS CLEAR TO SEE WHAT HAPPENS*/
#floatsample-1 #fs1sample3 #fs1-block3 {
clear: left;
}
/*TRY FLOATING THIS RIGHT TO SEE WHAT HAPPENS*/
#floatsample-1 #fs1sample4 .tall-container {
float: left;
}
/*TRY COMMENTING OUT THIS WIDTH TO SEE WHAT HAPPENS*/
#floatsample-1 #fs1sample4 {
width: 230px;
}
/*----------------------------------------------- Padding Sidenote -----------------------------------------------*/
#paddingsidenote h2 {
padding: 1.25em 0 0;
clear: both;
}
#paddingsodenote p {
clear: both;
}
#paddingapplication {
width: 320px;
}
#paddingapplication aside p {
margin: 0;
padding: 0;
}
#paddingapplication aside {
float: left;
border: 5px solid royalblue;
background: lightblue;
width: 140px;
height: 160px;
padding: 0;
}
#paddingapplication aside p {
background: mediumslateblue;
}
/*TRY CHANGING THIS PADDING TO 30PX 15PX AND SEE WHAT HAPPENS; WHAT ABOUT WHEN YOU CHANGE IT FROM PADDING TO MARGIN*/
#paddingapplication aside.paddingstyle1 {
padding: 13px 5px;
}
/*TRY CHANGING THIS PADDING TO 30PX 15PX AND SEE WHAT HAPPENS; WHAT ABOUT WHEN YOU CHANGE IT FROM PADDING TO MARGIN*/
#paddingapplication aside.paddingstyle2 p {
padding: 13px 5px;
}
/*----------------------------------------------- Parent vs Child -----------------------------------------------*/
#parentvchild h2 {
padding: 1.25em 0 0;
clear: both;
}
#parentvchild p {
clear: both;
}
#parentvchild article {
display: block;
margin-bottom: 2em;
overflow: auto;
}
#parentvchild h1 {
margin: 0;
}
#parentvchild ul {
margin: 0;
padding: 2.875em 0 0;
}
#parentvchild li {
font-size: 1.75em;
text-decoration: none;
display: inline-block;
padding: 0 1em;
}
/*I'M FLOATING THE PARENT ELEMENTS*/
#parentvchild #pvc1 .half-width{
float: left;
width: 50%;
}
#parentvchild #pvc1 h1{
float: left;
}
#parentvchild #pvc1 nav{
float: right;
}
/*NOW I'M FLOATING THE CHILD ELEMENTS*/
#parentvchild #pvc2 .half-width{
width: 50%;
}
#parentvchild #pvc2 h1{
float: left;
}
#parentvchild #pvc2 nav{
float: right;
}
/*TRY TURNING THIS OFF TO SEE WHAT HAPPENS. WHAT ABOUT WHEN THE HALF-WIDTH IS A FIXED WIDTH?*/
#parentvchild #pvc2 .half-width {
overflow: auto;
}
/*NOW I HAVE NO PARENT*/
#parentvchild #pvc3 {
background: teal;
}
#parentvchild #pvc3 h1{
float: left;
width: 50%;
text-align: left;
background: teal;
}
#parentvchild #pvc3 nav{
float: right;
width: 50%;
text-align: right;
background: mediumpurple;
}
/*----------------------------------------------- Float Sample 2 -----------------------------------------------*/
#floatsample-2 .wrapper {
background: yellow;
width: 375px;
}
#floatsample-2 #fs2sample1 .tall-container,
#floatsample-2 #fs2sample1 .short-container {
float: left;
}
#floatsample-2 #fs2sample2 .tall-container,
#floatsample-2 #fs2sample2 .short-container {
float: right;
}
#floatsample-2 .tall,
#floatsample-2 .short {
width: 105px;
padding: 5px;
}
/*TRY CHANGING THIS TO FLOAT RIGHT TO SEE WHAT HAPPENS*/
#floatsample-2 .fs2-block3 {
float: left;
}
/*SEE THE DIFFERENCE BETWEEN THESE TWO METHODS*/
#floatsample-2 .tall-container,
#floatsample-2 .short-container {
/*TRY CHANGING THIS TO MARGIN TO 150PX HERE AND SEE THE DIFFERENCE*/
margin: 5px 0;
}
#floatsample-2 #fs2sample1 .wrapper {
height: 370px;
}
#floatsample-2 #fs2sample2 .wrapper {
/*NOW TRY COMMENTING OUT OVERFLOW TO SEE WHAT HAPPENS*/
overflow:auto;
}
/*----------------------------------------------- Float Sample 3 -----------------------------------------------*/
#floatsample-3 .tall-container,
#floatsample-3 .short-container {
float: left;
}
/*TRY COMMENTING OUT THIS STYLE BELOW TO SEE WHAT HAPPENS*/
#floatsample-3 p {
clear: both;
}
/*NOW TRY COMMENTING OUT THIS STYLE BELOW TO SEE WHAT HAPPENS*/
#floatsample-3 #negative {
margin-top: -200px; /*negative margins are not ideal, but it is one way we can sneak up into this space*/
}
/*TRY CHANGING THIS WIDTH TO 1200px TO SEE WHAT HAPPENS, THEN REINSTATE IT BACK TO 600px*/
#floatsample-3 .main {
width: 600px;
}
/*----------------------------------------------- Float Sample 4 -----------------------------------------------*/
#floatsample-4 .main {
width: 600px;
}
#floatsample-4 .short-container {
float: left;
}
#floatsample-4 .short {
width: 105px;
height: 130px;
padding: 5px;
}
/*TRY CHANGING THE ID TO fs4-block2; TRY COMMENTING OUT THIS STYLE BELOW TO SEE WHAT HAPPENS*/
#floatsample-4 #fs4-block3 {
clear: left;
}
#floatsample-4 #fs4-block5,
#floatsample-4 #fs4-block6 {
float: right;
}
/*TRY COMMENTING OUT THIS STYLE BELOW TO SEE WHAT HAPPENS*/
#floatsample-4 #fs4-block6 {
clear: right;
}
/*TRY COMMENTING OUT THIS STYLE BELOW TO SEE WHAT HAPPENS*/
#floatsample-4 #fs4-block5 {
clear: left;
}
/*NOW TRY APPLYING THIS STYLE BELOW TO SEE WHAT HAPPENS*/
/*#floatsample-4 p {
clear: both;
}*/
/*----------------------------------------------- Backgrounds -----------------------------------------------*/
.main div {
background: darkgray;
}
.main div:nth-child(even) {
background: peachpuff;
}
.main div:nth-child(odd) {
background: orchid;
}
.main div:first-of-type {
background: teal;
}
.main div:nth-of-type(2) {
background: mediumpurple;
}
.main div:nth-of-type(3) {
background: deeppink;
}
.main div:nth-of-type(4) {
background: firebrick;
}
.main aside div:nth-child(even) {
background: green;
}
.main aside div:nth-child(odd) {
background: blue;
}
.main aside div:first-of-type {
background: orange;
}
.main aside:nth-of-type(2) div:nth-child(even) {
background: red;
}
.main aside:nth-of-type(2) div:nth-child(odd) {
background: yellow;
}
.main aside:nth-of-type(2) div:first-of-type {
background: mistyrose;
}
.main aside:nth-of-type(3) div:nth-child(even),
article:nth-of-type(3) div:nth-child(even) {
background: lightskyblue;
}
.main aside:nth-of-type(3) div:nth-child(odd),
article:nth-of-type(3) div:nth-child(odd) {
background: lightcoral;
}
.main aside:nth-of-type(3) div:first-of-type,
article:nth-of-type(3) div:first-of-type {
background: darkblue;
}
.main aside:nth-of-type(3) div:last-of-type,
article:nth-of-type(3) div:last-of-type {
background: azure;
}