Flexbox Layout Generator

Combine row, column, alignment, wrap, and gap in one box, then copy the HTML and CSS you see. Presets cover the usual jobs: a row, align to the end, center, a column, wrapping, gap, and filling the width.

This tool has been used … times.

Presets

          
        

Box colors are for the preview only. The copied CSS does not include them.

Container
Direction (flex-direction)
Wrap (flex-wrap)
Main axis (justify-content)
Cross axis (align-items)
Lines (align-content)

Line packing applies only when items wrap.

Preview height

Cross-axis centering, and the position of wrapped lines, only show when the container has extra height.

Items 4
Item

Editing item 1. Click a box in the preview to switch items.

Sizing (flex)

flex: 1 ignores content size and makes equal widths. flex: auto keeps the content size and shares only the leftover space.

Order
This item only (align-self)

How to use

  1. Pick a preset, or set the container yourself.
  2. Click a box in the preview to edit only that item. The number on the box is its place in the HTML.
  3. The line under the preview shows if justify-content is acting horizontally or vertically. A column swaps the axes.
  4. Copy HTML and CSS, or CSS only, then rename .flex-layout and .flex-item on your page.

ご利用にあたっては、本Webアプリの 利用規約 も合わせてご確認ください。

バグや表示の乱れ、追加してほしい機能などがあれば、こちらよりお知らせください。

バグや表示の乱れ、使いにくかった点、追加してほしい機能などがあればお知らせください。
同意事項
・本フォームは不具合報告・改善要望専用です。個別の返信は原則行っておりません。
・誹謗中傷、脅迫、公序良俗に反する内容が含まれる場合、IPアドレス等のログに基づきしかるべき対処を行います。