Skip to content

Commit 5859fc4

Browse files
slight modification to centering example
1 parent 23a75ce commit 5859fc4

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

css-cookbook/center.html

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@
2121
}
2222
</style>
2323

24-
<style class="editable">
25-
.container {
26-
height: 200px;
27-
display: flex;
28-
align-items: center;
29-
justify-content: center;
30-
}
24+
<style class="editable">
25+
.container {
26+
height: 200px;
27+
display: flex;
28+
align-items: center;
29+
justify-content: center;
30+
}
3131

32-
.item {
33-
width: 10em;
34-
}
35-
</style>
32+
.item {
33+
width: 10em;
34+
}
35+
</style>
3636

3737
</head>
3838

@@ -43,24 +43,24 @@
4343
</div>
4444
</section>
4545

46-
<textarea class="playable playable-css">
47-
.container {
48-
height: 200px;
49-
display: flex;
50-
align-items: center;
51-
justify-content: center;
52-
}
53-
54-
.item {
55-
width: 10em;
56-
}
57-
</textarea>
46+
<textarea class="playable playable-css" style="height: 170px;">
47+
.container {
48+
height: 200px;
49+
display: flex;
50+
align-items: center;
51+
justify-content: center;
52+
}
5853

59-
<textarea class="playable playable-html">
60-
<div class="container">
61-
<div class="item">I am centered!</div>
62-
</div>
63-
</textarea>
54+
.item {
55+
width: 10em;
56+
}
57+
</textarea>
58+
59+
<textarea class="playable playable-html" style="height: 70px;">
60+
<div class="container">
61+
<div class="item">I am centered!</div>
62+
</div>
63+
</textarea>
6464

6565

6666
<div class="playable-buttons">
@@ -70,4 +70,4 @@
7070
<script src="playable.js"></script>
7171

7272

73-
</html>
73+
</html>

0 commit comments

Comments
 (0)