Using the CSS Flexbox Generator
The CSS Flexbox Generator writes one flex container declaration from four settings. Direction starts on row. Justify starts on flex-start. Align starts on stretch. Gap starts at 16. Choose Build the CSS. The headline is the word flex, and the label above it reads CSS. The text under the headline is five lines. They set display to flex, flex-direction to row, justify-content to flex-start, align-items to stretch, and gap to 16px. Each property sits on its own line, with a space after the colon and a semicolon at the end.
The detail lines name Direction as row and Gap as 16px. The steps say that display is set to flex, that the direction, justify, align, and gap you chose are written next, and that the page does not attach the CSS to an element. Copy result copies the five-line declaration. It does not copy the headline word flex. Reset puts the menus and the gap back to row, flex-start, stretch, and 16, and it returns the headline to Choose the flex settings. Copy the declaration before you reset, because the text is cleared.
Direction is row or column. Justify is flex-start, center, flex-end, or space-between. Align is stretch, flex-start, center, or flex-end. Gap is a whole number from 0 to 100, and the unit written on the last line is px. The page fills a fixed five-line template with those choices. It does not write a stylesheet, a selector, or a rule for the items inside the container. Child properties such as flex-grow stay outside this declaration.
The same four accepted settings always rebuild the same five lines. Change one menu and build again when you want that one line to change. An invalid gap replaces the headline with the gap message and clears the declaration, so an error never sits under an older block of CSS. A posted direction, justify, or align outside the menus is rejected before any line is written.
What the Five Lines Contain
The declaration is a container rule. The first line is always display set to flex. The second line is flex-direction set to the direction you chose, row or column. The third line is justify-content set to flex-start, center, flex-end, or space-between. The fourth line is align-items set to stretch, flex-start, center, or flex-end. The fifth line is gap set to the whole number you typed, followed by px. For the starting settings that fifth line is gap set to 16px. Count the lines after a build. Five semicolons means the template wrote every property, from display through gap.
The headline stays the word flex on every successful build. It does not change when you switch to column or when you change the gap. Read the five lines, not the headline, when you need the actual declaration. The Direction line repeats the direction word. The Gap line repeats the number with px. Justify and align appear in the declaration itself and are not given extra detail lines. That is the whole result. There is no second block for the flex items. If a layout needs a rule for the children, write that rule yourself after you paste these five lines.
How Each Setting Is Written
The page reads the direction menu first and accepts only row or column. It then reads justify and accepts only flex-start, center, flex-end, or space-between. It then reads align and accepts only stretch, flex-start, center, or flex-end. Gap is read last. The gap must be digits only, with no decimal point and no minus sign, and the integer must be from 0 through 100. Those four values are placed into the five-line template in that same order. A space follows each colon. A semicolon ends each line. A line break separates the properties. Copy result places that finished block on the clipboard, in the same order, with the semicolons still attached.
Nothing in the template is calculated from the others. A larger gap does not change justify. Column does not swap the meaning of the align menu. The words you selected are the words that are written. Switch one menu, build again, and only the line that belongs to that menu should change. Equal columns are a different container. The CSS Grid Generator writes display grid, a repeat of 1fr columns, and a gap. Use that page when every column should be one fraction of the grid. Use this page when the container should be flex and you want direction, justify, align, and gap in one declaration.
What the Declaration Leaves Unwritten
The page stops after the container declaration. It does not write a stylesheet, and it does not invent a class or an element to hang the declaration on. Paste the five lines into a rule you already have if you want them attached to a selector. The page also skips flex-wrap, flex-basis, flex-grow, order, and any width on the items. If those belong in your layout, add them in your own rule after you paste. They will not appear no matter which menu you pick. A successful headline still reads flex, which tells you the build worked and says nothing about the items inside the container.
row-reverse and column-reverse are absent from the direction menu. space-around and space-evenly are absent from justify. Baseline is absent from align. Align also has no space-between choice, even though justify does. A value outside a menu is rejected with Choose row or column, Choose a justify value, or Choose an align value, matching the field that failed. The gap message is separate. Gap must be a whole number from 0 to 100. A legal menu with an illegal gap still produces no CSS at all.
Row, Flex-Start, Stretch, and Gap 16
Leave every field on its start value and choose Build the CSS. The headline reads flex. The declaration reads display set to flex, flex-direction set to row, justify-content set to flex-start, align-items set to stretch, and gap set to 16px, each on its own line with a semicolon. The Direction line reads row. The Gap line reads 16px. Build again without edits. The five lines match, because the template and the settings did not change. That second build is the check that the form is not adding a sixth property behind the five you can see.
Switch direction to column and build again. Only the flex-direction line changes, to column. The justify, align, and gap lines stay on flex-start, stretch, and 16px. Put direction back to row, set justify to space-between, and build again. The third line becomes space-between and the other lines return to the sample wording if you also restored align and gap. Read that third line before you copy, so the justify word matches the menu. A shadow is a different declaration. The CSS Box Shadow Generator writes a box-shadow rule from offsets, blur, spread, and color. Use that page when you are adding a shadow. Use this page when you are writing the flex container.
Menus, Whole Numbers, and the Gap Cap
Direction has two choices, justify has four, and align has four. The starting combination is row, flex-start, and stretch. Gap starts at 16 and must stay a whole number from 0 to 100. Gap 0 is accepted and is written as 0px. Gap 100 is accepted and is written as 100px. Gap 101 is rejected. Gap 16.5 is rejected because of the decimal point. A blank gap, a minus sign, and a word in the gap field are rejected with the same gap message. Restore a whole number from 0 to 100 and build again when you want the five lines back on the page.
The three menus reject a posted value that is not in their lists, and each rejection names the menu it belongs to. The page does not quietly substitute flex-start for an unknown justify word. It does not drop a bad gap and still emit the other four lines. One bad field stops the build, clears the declaration, and puts the message in the headline. Fix that field and build again. The previous five lines do not remain under the error. Build again after the fix and read all five lines, because the new block replaces whatever you remember from the last success.
Settings People Expect and Do Not Get
A common miss is to look for space-between on the align menu. Space-between is a justify choice only. Align offers stretch, flex-start, center, and flex-end. Another miss is to type 16px into the gap field. The field wants the digits 16. The page adds px when it writes the line. A third miss is to expect flex-wrap or a child rule in the result. The result is the container declaration and nothing else. A fourth miss is to read the headline word flex as the CSS to paste. The pasteable text is the five-line block under the headline. If that block is missing, the headline is an error or the form is still waiting, and there is nothing to paste. Selecting the single word flex and pasting that word into a stylesheet does not recreate the container.
A recolored hex is a different result entirely. The Color Blindness Simulator runs one #RGB or #RRGGBB color through a Machado 2009 severity-1 matrix and returns a simulated hex. It does not write flex CSS. Use that page when you want the approximation of a typed color. Use this page when you want the five-line flex declaration.
Changing One Control at a Time
Start from the sample and set the gap to 0. Build. The last line is gap set to 0px, and the first four lines still show flex, row, flex-start, and stretch. Set the gap to 100 and build again. The last line becomes 100px. Set the gap to 101 and build. The headline reads Gap must be a whole number from 0 to 100, and the declaration is cleared. Put 16 back before the next run so a later experiment is not rejected for an old gap. The cleared declaration stays empty until a later build with a legal gap succeeds.
Set align to center and justify to center, with direction on row and gap on 16. Build. The third line is center and the fourth line is center. Those are two different properties that happen to share a word. Set justify to flex-end and align to flex-start. Build. The lines now differ. Set direction to column and leave the others. Build once more. Only flex-direction changes to column. Reading the five lines after each single change shows which property moved. Keep a copy of the sample block nearby so you can see the difference in one glance.
Keeping the Declaration With Its Settings
Copy result copies the five lines, including the semicolons and the line breaks. File that block with a note of the four settings, because the headline is only the word flex and will look the same for every successful build. For the sample, the note is row, flex-start, stretch, and gap 16. If you changed justify to space-between, write space-between in the note so a later read of the third line has a matching reminder. The Direction and Gap detail lines repeat two of the four settings, which helps when you are checking the block in a hurry.
The page does not keep earlier declarations after the next build or after a reset. Copy first. A reset puts the headline back on Choose the flex settings and erases the block, even though the fields return to the sample. A compact data file is a different kind of text to store beside the CSS. The JSON Minifier parses one JSON value and writes it again without insignificant space. Use that page when the text is JSON and you want the compact form. Use this page when the text you are copying is the flex declaration.
A Container Rule You Still Paste Yourself
The five lines are ready to paste into a selector you control. The page does not write the selector, does not create a stylesheet file, and does not attach the rule to an element on this site. Display flex is the first line on every successful run. The next four lines are your direction, your justify, your align, and your gap in pixels. That is the entire contract of the generator. Anything beyond those five properties is work you do after the paste, in the stylesheet you control.
Reading the Block Before You Paste
Read the second line and confirm row or column. Read the third line against the justify menu and the fourth line against the align menu. Read the fifth line and confirm the number is the gap you typed, followed by px, with no extra unit you did not ask for. Then copy. If the headline is an error, there is no declaration to paste. Correct the field the message names and build again. The waiting headline Choose the flex settings means the form was reset or has not been built yet. Build once before you copy, even when the fields already show the sample, so the five lines are actually on the page.
A permission mode is a different string of digits. The chmod Calculator turns a three-digit mode from 000 to 777 into the symbolic form. It does not emit flex properties. Use that page when you are writing a permission mode. Use this page when you are writing display flex with direction, justify, align, and gap.