logo
Will's
Tools
logo

Simple 2-Column Flex Code Generator

This generator is intended to provide copy-and-paste code for use where 2 flex columns are desired.

The 2 columns may be used for the entire width of a web page. The 2 columns may also be used for a container on the web page — examples are a regular content column or a cell within a table.

Note that even when the 2 columns are in a separate container on the web page, the width that determines at what point the boxes are stacked is the width of the browser window, not the width of the separate container.

To disable stacking (always keep it 2 columns), specify 1 pixel for stacking the boxes at a certain browser window width.

Illustrations

Side-by-side on Wide Screen
Left
Right
Stacked on
Narrow Screen
Left
Right

Generator

Measurements:

Maximum total width for container holding side-by-side boxes is pixels.

"Left" box width adjusts to accomodate width available after "right" box is placed.

"Right" box width is pixels.

Space between "Left" and "Right" boxes is pixels.

Stack the boxes when total width of the browser window is less than pixels.

(Generated code appears below.)

Generated CSS and HTML

[to come]

Copyright 2024 Will Bontrager Software LLC