SS Toolbox
All data is processed locally

CSS Flexbox Align & Justify Demo

Visualize flex container and items to clearly see how child elements position within the flex container

Control Panel

Adjust flexbox properties to observe different alignment and distribution effects

Direction of flex items

Cross-axis alignment of items

Main-axis alignment and distribution

Whether items wrap to new lines

Cross-axis alignment of wrapped lines

Current settings: flex-direction: row | align-items: center | justify-content: flex-start | flex-wrap: nowrap | align-content: stretch

Flex Demo Area

Flex container with items of different sizes to demonstrate flexbox alignment effects

A
B
C
D
E
F
G
H

Property Explanations

Basic Flex Properties

Flex Direction

  • row - Items flow horizontally (left to right)
  • row-reverse - Items flow horizontally (right to left)
  • column - Items flow vertically (top to bottom)
  • column-reverse - Items flow vertically (bottom to top)

Flex Wrap

  • nowrap - Items stay on single line
  • wrap - Items wrap to new lines as needed
  • wrap-reverse - Items wrap to new lines in reverse order

Alignment Properties

Align Items (Cross-axis)

  • flex-start - Align items to start of cross-axis
  • center - Center items on cross-axis
  • flex-end - Align items to end of cross-axis
  • stretch - Stretch items to fill cross-axis
  • baseline - Align items along their baseline

Justify Content (Main-axis)

  • flex-start - Pack items to start of main-axis
  • center - Center items on main-axis
  • flex-end - Pack items to end of main-axis
  • space-* - Distribute space between items
Related Tools