freecoding.school100% FREE · NO SIGNUP
Grid CanyonISSUE #14 of 27

flex items · align-self · order

FlexboVSThe Float Phantom
Flexbo saysalign-self overrides cross-axis alignment per item; order reshuffles items visually.

align-self lets one item break from the container's align-items. order changes the visual sequence without touching the HTML (default 0; lower comes first). Use order sparingly: it can desync visual and tab order, hurting accessibility.

Power-ups you unlock

The Float Phantom attacks — common mistakes

Boss battleBottom-align one item with align-self, then move the last item first with order:-1.

Example code

<!doctype html><html><head><meta charset="utf-8">
<style>.f{display:flex;gap:10px;height:120px;align-items:flex-start}.f div{background:#b388ff;color:#06040d;padding:12px}.low{align-self:flex-end}.first{order:-1}</style></head><body style="background:#06040d;padding:20px"><div class="f"><div>a</div><div class="low">bottom</div><div class="first">moved first</div></div></body></html>
▶ Open the interactive comic issue
‹ Flex Items · Grow · Shrink · BasisGrid · The Two-Dimensional Layout ›