forked from ecarlisle/Easy-Layouts-with-Flexbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparent-justify-content.html
74 lines (74 loc) · 2.81 KB
/
parent-justify-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
<!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>
</head>
<body>
<header></header>
<main>
<article>
<nav></nav>
<section>
<h2>Parent - Justify 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="space-between-button">space-between</span>
<span id="space-around-button">space-around</span>
</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 class="example">
<div>1</div>
<div>2</div>
<div>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(){
$('.example').css('justify-content','flex-start')
});
$('#flex-end-button').on('click',function(){
$('.example').css('justify-content','flex-end')
});
$('#center-button').on('click',function(){
$('.example').css('justify-content','center')
});
$('#space-between-button').on('click',function(){
$('.example').css('justify-content','space-between')
});
$('#space-around-button').on('click',function(){
$('.example').css('justify-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 -->