flex-basis
The flex-basis property specifies the default size of a flex item.
Formal Syntax
content | <'width'>
JavaScript Access
// Access via element.style
element.style.flexBasis = 'auto';
Browser Support
| Feature | Chrome | Firefox | Safari | Edge |
|---|---|---|---|---|
| flex-basis | 29 | 22 | 9 | 12 |
| auto | 22 | 22 | 9 | 12 |
| content | 94 | 61 | 15.4 | 94 |
| fit-content | 94 | 94 | 16 | 94 |
| max-content | 94 | 66 | 16 | 94 |
| min-content | 94 | 66 | 16 | 94 |
| stretch | 138 | β | β | 138 |
Related Properties
- align-content
- align-items
- align-self
- anchor-name
- anchor-scope
- break-after
- break-before
- break-inside
- caption-side
- clear
- column-count
- column-fill
- column-gap
- column-rule
- column-rule-color
- column-rule-style
- column-rule-width
- column-span
- column-width
- columns
- contain
- container
- container-name
- container-type
- content
- content-visibility
- display
- empty-cells
- flex
- flex-direction
- flex-flow
- flex-grow
- flex-shrink
- flex-wrap
- float
- gap
- grid
- grid-area
- grid-auto-columns
- grid-auto-flow
- grid-auto-rows
- grid-column
- grid-column-end
- grid-column-start
- grid-row
- grid-row-end
- grid-row-start
- grid-template
- grid-template-areas
- grid-template-columns
- grid-template-rows
- justify-content
- justify-items
- justify-self
- order
- overflow
- overflow-anchor
- overflow-block
- overflow-inline
- overflow-wrap
- overflow-x
- overflow-y
- place-content
- place-items
- place-self
- position-anchor
- position-area
- position-try
- position-try-fallbacks
- position-try-order
- position-visibility
- resize
- row-gap
- table-layout
- text-overflow
- visibility
- z-index
- reading-flow π§ͺ
- reading-order π§ͺ
- align-tracks π§
- block-ellipsis π§
- block-step π§
- block-step-align π§
- block-step-insert π§
- block-step-round π§
- block-step-size π§
- bookmark-label π§
- bookmark-level π§
- bookmark-state π§
- column-height π§
- column-rule-break π§
- column-rule-outset π§
- column-wrap π§
- continue π§
- float-defer π§
- float-offset π§
- float-reference π§
- flow-from π§
- flow-into π§
- grid-column-gap π§
- grid-gap π§
- grid-row-gap π§
- inline-sizing π§
- item-cross π§
- item-direction π§
- item-flow π§
- item-pack π§
- item-tolerance π§
- item-track π§
- item-wrap π§
- justify-tracks π§
- region-fragment π§
- row-rule π§
- row-rule-break π§
- row-rule-color π§
- row-rule-outset π§
- row-rule-style π§
- row-rule-width π§
- rule π§
- rule-break π§
- rule-color π§
- rule-outset π§
- rule-overlap π§
- rule-style π§
- rule-width π§
- wrap-after π§
- wrap-before π§
- wrap-flow π§
- wrap-inside π§
- wrap-through π§
- page-break-after ποΈ
- page-break-before ποΈ
- page-break-inside ποΈ