-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathparent-align-content.html
124 lines (124 loc) · 4.08 KB
/
parent-align-content.html
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
<!doctype html>
<html class="no-js" lang="">
<head>
<title>Ridiculously Easy Layouts with Flexbox</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='http://fonts.googleapis.com/css?family=Lato:400,700,400italic|Architects+Daughter' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="assets/css/normalize.css/normalize.css">
<link rel="stylesheet" href="assets/css/global.css">
<link rel="stylesheet" href="assets/css/examples.css">
<link rel="stylesheet" href="assets/css/flexbox.css">
<script type="text/javascript" src="assets/js/jquery/jquery.js"></script>
<style>
.example {
min-height: 35rem;
flex-wrap: wrap;
}
.example div {
padding: 1rem;
}
</style>
</head>
<body>
<header></header>
<main>
<article>
<nav></nav>
<section>
<h2>Parent - Align Content</h2>
<div class="controls">
<div>
<span id="flex-start-button">flex-start</span>
<span id="flex-end-button">flex-end</span>
<span id="center-button">center</span>
<span id="stretch-button">stretch</span>
<span id="space-between-button">space-between</span>
<span id="space-around-button">space-around</span>
</div>
<div>
<form>
<strong>Flex Direction:</strong>
<br/>
<input type="radio" name="direction" value="row" checked="checked" /> Row
<br/>
<input type="radio" name="direction" value="column" /> Column
</form>
</div>
</div>
<div class="example">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
<div>9</div>
<div>10</div>
<div>11</div>
<div>12</div>
<div>13</div>
<div>14</div>
<div>15</div>
<div>16</div>
<div>17</div>
<div>18</div>
<div>19</div>
<div>20</div>
<div>21</div>
<div>22</div>
<div>23</div>
<div>24</div>
<div>25</div>
<div>26</div>
<div>27</div>
<div>28</div>
<div>29</div>
<div>30</div>
<div>31</div>
<div>32</div>
<div>33</div>
<div>34</div>
<div>35</div>
<div>36</div>
<div>37</div>
<div>38</div>
<div>39</div>
<div>40</div>
</div>
</section>
</article>
</main>
<footer></footer>
<script type="text/javascript">
$(document).ready(function( ){
$('#flex-start-button').on('click',function(){
$('.example').css('align-content','flex-start')
});
$('#flex-end-button').on('click',function(){
$('.example').css('align-content','flex-end')
});
$('#center-button').on('click',function(){
$('.example').css('align-content','center')
});
$('#stretch-button').on('click',function(){
$('.example').css('align-content','stretch')
});
$('#space-between-button').on('click',function(){
$('.example').css('align-content','space-between')
});
$('#space-around-button').on('click',function(){
$('.example').css('align-content','space-around')
});
});
</script>
<script src="assets/js/examples.js"></script>
</body>
</html>
<!-- Stay out of divland - allows us to be semantic (but we still use divs as containers or specialized containers) -->
<!-- Divs are now just for additional formatting not pertaining to content -->
<!-- Div - generic container -->