Skip to content

Commit bb4625f

Browse files
committed
feat: spacing and aligning flex items
1 parent 44586a6 commit bb4625f

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

starter/04-CSS-Layouts/flexbox.html

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,32 @@
4040
margin: 40px;
4141
display: flex;
4242
align-items: center;
43-
justify-content: space-between;
43+
justify-content: flex-start;
44+
gap: 30px;
4445
/* FLEXBOX */
4546
}
47+
48+
/* *!!! Use 'gap' instead */
49+
/* .el {
50+
margin-right: 30px;
51+
} */
52+
53+
.el--1 {
54+
/* Make this element vertically at the top of the container */
55+
align-self: flex-start;
56+
}
57+
58+
.el--5 {
59+
/* Stretch this element vertically to the same height as the container */
60+
align-self: stretch;
61+
/* Move this element to after default position (more than zero) */
62+
order: 1;
63+
}
64+
65+
.el--6 {
66+
/* Move this element to before default position (less than zero) */
67+
order: -1;
68+
}
4669
</style>
4770
</head>
4871
<body>

0 commit comments

Comments
 (0)