-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathchild-align-self.html
80 lines (79 loc) · 2.69 KB
/
child-align-self.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
<!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 {
align-items: center;
height: 300px;
}
#e3 {
height: 100px;
width: 80px;
padding: 1rem 0 3rem;
margin: 2rem 0 1rem;
}
</style>
</head>
<body>
<header></header>
<main>
<article>
<nav></nav>
<section>
<h2>Child - Order</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="baseline-button">baseline</span>
</div>
</div>
<div class="example">
<div>1</div>
<div>2</div>
<div id="e3">3</div>
<div>4</div>
<div>5</div>
</div>
</section>
</article>
</main>
<footer></footer>
<script type="text/javascript">
$(document).ready(function( ){
$('#flex-start-button').on('click',function(){
$('#e3').css('align-self','flex-start');
});
$('#flex-end-button').on('click',function(){
$('#e3').css('align-self','flex-end');
});
$('#center-button').on('click',function(){
$('#e3').css('align-self','center');
});
$('#stretch-button').on('click',function(){
$('#e3').css('align-self','stretch');
});
$('#baseline-button').on('click',function(){
$('#e3').css('align-self','baseline');
});
});
</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 -->