VOOZH about

URL: https://www.geeksforgeeks.org/css/primer-css-flexbox-flex-container/

⇱ Primer CSS Flexbox Flex Container - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Primer CSS Flexbox Flex Container

Last Updated : 23 Jul, 2025

Primer CSS is a free open-source CSS framework that is built upon systems that create the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure our patterns are steady and interoperable with every other. 

Primer CSS Flexbox Flex Container is used to make an element layout it's content using the flexbox model. Each direct child of the flex container will become a flex item.

Primer CSS Flexbox Flex Container Classes:

  • d-flex: The class is used to make the elements like a block and lays out its content using the flexbox model.
  • d-inline-flex: The class is used to make the element like an inline element and lays out its content using the flexbox model.

Syntax:

<div class="border d-flex">
 ...
</div>

Example 1: The below example illustrates the Primer CSS Flexbox Flex Container using d-flex class.

Output:

👁 Image
 

Example 2: The below example illustrates the Primer CSS Flexbox Flex Container using the d-inline-flex class.

Output:

👁 Image
 

Reference: https://primer.style/product/css-utilities/#flex-container

Comment