encyclopegia.org

Flexbox

CSS Flexible Box Layout, commonly known as Flexbox, is a CSS web layout model. It is in the W3C's candidate recommendation (CR) stage. The flex layout allows responsive elements within a container to be automatically arranged depending on viewport (device screen) size.

CSS Flexible Box Layout, commonly known as Flexbox, is a CSS web layout model. It is in the W3C's candidate recommendation (CR) stage. The flex layout allows responsive elements within a container to be automatically arranged depending on viewport (device screen) size. ==Terminology== The following terms are associated with the flexbox layout model. Flex container Parent element that holds all flex items. Using the CSS display property, the container can be defined as either flex or inline-flex. Flex item Any direct child element held within the flex container is considered a flex item. Any text within the container element is wrapped in an unknown flex item. Axes Each flex box contains two axes: the main and cross axes. The main axis is the axis on which the items align with each other. The cross axis is perpendicular to the main axis. Flex-direction Establishes main axis. Possible arguments: row (default), row-reverse, column, column-reverse. Justify-content Determines how content gets placed on the main axis on the current line. Optional arguments: left, right, center, space-between, space-around. Align-items Determines the default for how flex items get placed on the cross axis on each line. Align-content Determines the default for how cross axis lines are aligned. Align-self Determines how a single item is placed along the cross axis. This overrides any defaults set by align-items. display: flex; Or: display: inline-flex; By setting the display to one of the two values above, an element becomes a flex container and its children, flex items. Setting the display to flex makes the container a block-level element, while setting the display to inline-flex makes the container an inline-level element. One of flexbox's advantages is the ability to easily align items within the container to the center of a page, both vertically and horizontally. .container { display: flex; align-items: center; justify-content: center; } ==References==

References

  1. Use CSS media queries to create responsive websites · retrieved 2021-04-07 · rev 1378909525
    Cite this reference

    MLA "Use CSS media queries to create responsive websites." Bail, Jeff (2012-10-23). 2021-04-07. https://web.archive.org/web/20201013191836/https://www.ibm.com/developerworks/library/wa-cssqueries/index.html. Accessed 24 November 2026.

    Chicago "Use CSS media queries to create responsive websites." Bail, Jeff (2012-10-23). 2021-04-07. https://web.archive.org/web/20201013191836/https://www.ibm.com/developerworks/library/wa-cssqueries/index.html.

    APA Bail, Jeff (2012-10-23). (2021). Use CSS media queries to create responsive websites. Retrieved November 24, 2026, from https://web.archive.org/web/20201013191836/https://www.ibm.com/developerworks/library/wa-cssqueries/index.html

  2. Flexible Box Layout Module, W3C Working Draft, 23 July 2009 Wikipedia revision 1378909525, retrieved 2026-11-18 · retrieved 2026-11-17 · rev 1378909525
    Cite this reference

    MLA "Flexible Box Layout Module, W3C Working Draft, 23 July 2009 Wikipedia revision 1378909525, retrieved 2026-11-18." 2026-11-17. https://www.w3.org/TR/2009/WD-css3-flexbox-20090723/. Accessed 24 November 2026.

    Chicago "Flexible Box Layout Module, W3C Working Draft, 23 July 2009 Wikipedia revision 1378909525, retrieved 2026-11-18." 2026-11-17. https://www.w3.org/TR/2009/WD-css3-flexbox-20090723/.

    APA encyclopegia.org. (2026). Flexible Box Layout Module, W3C Working Draft, 23 July 2009 Wikipedia revision 1378909525, retrieved 2026-11-18. Retrieved November 24, 2026, from https://www.w3.org/TR/2009/WD-css3-flexbox-20090723/

  3. CSS3 Flexible Box Layout: Everything I Wish I Knew When I Started · retrieved 2021-04-07 · rev 1378909525
    Cite this reference

    MLA "CSS3 Flexible Box Layout: Everything I Wish I Knew When I Started." a b Shepherd, Richard (2011-09-19). 2021-04-07. https://www.smashingmagazine.com/2011/09/css3-flexible-box-layout-explained/. Accessed 24 November 2026.

    Chicago "CSS3 Flexible Box Layout: Everything I Wish I Knew When I Started." a b Shepherd, Richard (2011-09-19). 2021-04-07. https://www.smashingmagazine.com/2011/09/css3-flexible-box-layout-explained/.

    APA a b Shepherd, Richard (2011-09-19). (2021). CSS3 Flexible Box Layout: Everything I Wish I Knew When I Started. Retrieved November 24, 2026, from https://www.smashingmagazine.com/2011/09/css3-flexible-box-layout-explained/

  4. CSS Flexible Box Layout Module · retrieved 2020-09-02 · rev 1378909525
    Cite this reference

    MLA "CSS Flexible Box Layout Module." 2020-09-02. https://caniuse.com/flexbox. Accessed 24 November 2026.

    Chicago "CSS Flexible Box Layout Module." 2020-09-02. https://caniuse.com/flexbox.

    APA encyclopegia.org. (2020). CSS Flexible Box Layout Module. Retrieved November 24, 2026, from https://caniuse.com/flexbox

  5. CSS Flexible Box Layout Module Level 1 Publication History - W3C · retrieved 2021-04-07 · rev 1378909525
    Cite this reference

    MLA "CSS Flexible Box Layout Module Level 1 Publication History - W3C." 2021-04-07. https://www.w3.org/standards/history/css-flexbox-1. Accessed 24 November 2026.

    Chicago "CSS Flexible Box Layout Module Level 1 Publication History - W3C." 2021-04-07. https://www.w3.org/standards/history/css-flexbox-1.

    APA encyclopegia.org. (2021). CSS Flexible Box Layout Module Level 1 Publication History - W3C. Retrieved November 24, 2026, from https://www.w3.org/standards/history/css-flexbox-1

  6. CSS Flexible Box Layout Module Level 1 · retrieved 2021-04-07 · rev 1378909525
    Cite this reference

    MLA "CSS Flexible Box Layout Module Level 1." a b c d e f g Atkins Jr. 2021-04-07. https://www.w3.org/TR/css-flexbox-1/. Accessed 24 November 2026.

    Chicago "CSS Flexible Box Layout Module Level 1." a b c d e f g Atkins Jr. 2021-04-07. https://www.w3.org/TR/css-flexbox-1/.

    APA a b c d e f g Atkins Jr. (2021). CSS Flexible Box Layout Module Level 1. Retrieved November 24, 2026, from https://www.w3.org/TR/css-flexbox-1/

  7. CSS Grid Layout Module Level 1 · retrieved 2021-04-07 · rev 1378909525
    Cite this reference

    MLA "CSS Grid Layout Module Level 1." Atkins Jr. 2021-04-07. https://www.w3.org/TR/css-grid-1/. Accessed 24 November 2026.

    Chicago "CSS Grid Layout Module Level 1." Atkins Jr. 2021-04-07. https://www.w3.org/TR/css-grid-1/.

    APA Atkins Jr. (2021). CSS Grid Layout Module Level 1. Retrieved November 24, 2026, from https://www.w3.org/TR/css-grid-1/

  8. CSS Flexible Box Layout Module Level 1 · retrieved 2021-04-07 · rev 1378909525
    Cite this reference

    MLA "CSS Flexible Box Layout Module Level 1." a b Atkins Jr, Tab; Etemad, Elika J. 2021-04-07. https://drafts.csswg.org/css-flexbox/. Accessed 24 November 2026.

    Chicago "CSS Flexible Box Layout Module Level 1." a b Atkins Jr, Tab; Etemad, Elika J. 2021-04-07. https://drafts.csswg.org/css-flexbox/.

    APA a b Atkins Jr, Tab; Etemad, Elika J. (2021). CSS Flexible Box Layout Module Level 1. Retrieved November 24, 2026, from https://drafts.csswg.org/css-flexbox/

  9. Basic concepts of flexbox · retrieved 2021-04-07 · rev 1378909525
    Cite this reference

    MLA "Basic concepts of flexbox." a b "Basic concepts of flexbox". 2021-04-07. https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox. Accessed 24 November 2026.

    Chicago "Basic concepts of flexbox." a b "Basic concepts of flexbox". 2021-04-07. https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox.

    APA a b "Basic concepts of flexbox". (2021). Basic concepts of flexbox. Retrieved November 24, 2026, from https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox

Cite this article

MLA

"Flexbox." encyclopegia.org, 2026, https://encyclopegia.org/wiki/flexbox. Accessed 24 November 2026.

Chicago

"Flexbox." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/flexbox.

APA

encyclopegia.org. (2026). Flexbox. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/flexbox

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1378909525 · 0.5 · snapshot enwiki-001378909525

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.