Bootstrap Utility API Guide: Align Content

What this Bootstrap Utility API class does

Sets the CSS property "align-content" of an element. The CSS property "align-content" is used to set the distribution of space between and around content items along the cross-axis of a flexbox container, when there is extra space available. It determines how the flex lines are positioned within the flex container. This property is only applicable when the flexbox container has multiple lines of content, which can occur when the "flex-wrap" property is set to "wrap".

By using the "align-content" property, a web developer can control the position and spacing of the flex lines within a flexbox container.

Example usage & available classes

<div class="d-flex align-content-start flex-wrap"></div>
<div class="d-flex align-content-end flex-wrap"></div>
<div class="d-flex align-content-center flex-wrap"></div>
<div class="d-flex align-content-between flex-wrap"></div>
<div class="d-flex align-content-around flex-wrap"></div>
<div class="d-flex align-content-stretch flex-wrap"></div>

Example override

In the example override below, we are removing the responsive option from the utility, which means it would not be available per breakpoint.

"align-content": map-merge(
    map-get($utilities, "align-content"),
    (
        responsive: false
    )
)

More Bootstrap utilities

More Frontend Developer Resources

Web Development Courses

  • Build professional projects for your portfolio Build professional projects for your portfolio
  • Master CSS, HTML and JavaScript Master CSS, HTML and JavaScript
  • Learn to use popular frontend frameworks and libraries such as Vue.js, React.js, Bootstrap and Tailwind CSS Learn to use popular frontend frameworks and libraries such as Vue.js, React.js, Bootstrap and Tailwind CSS
View Courses

Web Development Quizzes

  • Flexible study option that you can access anytime Flexible study option that you can access anytime
  • Helps you identify areas that need improvement. Helps you identify areas that need improvement.
  • Topics such as HTML, CSS, JavaScript, responsive design, accessibility, and more Topics such as HTML, CSS, JavaScript, responsive design, accessibility, and more
View Quizzes

Web Development Flashcards

  • Helps you stay organized and focused while learning Helps you stay organized and focused while learning
  • Engaging way to learn frontend web development on-the-go Engaging way to learn frontend web development on-the-go
  • Perfect for reinforcing your knowledge of key concepts, terminology, and best practices Perfect for reinforcing your knowledge of key concepts, terminology, and best practices
View Flashcards

Frontend Developer Challenges

  • Suitable for frontend web developers of all levels Suitable for frontend web developers of all levels
  • Encourages you to think outside the box Encourages you to think outside the box
  • A great way to practice and apply your knowledge in a real-world context A great way to practice and apply your knowledge in a real-world context
View Challenges

Free Website Templates

  • Saves you time and effort by providing ready-to-use templates Saves you time and effort by providing ready-to-use templates
  • Strong foundation for building your own custom websites Strong foundation for building your own custom websites
  • Perfect for learners who want to experiment with different designs and layouts Perfect for learners who want to experiment with different designs and layouts
View Free Templates

Frontend HTML Snippets

  • Saves you time and effort by providing ready-to-use code Saves you time and effort by providing ready-to-use code
  • Wide range of components, such as navbar, carousel, modal, and more Wide range of components, such as navbar, carousel, modal, and more
  • Library of HTML code snippets to streamline your frontend web development workflow Library of HTML code snippets to streamline your frontend web development workflow
View Snippets

Frontend Tech Terminology

  • Suitable for learners of all levels Suitable for learners of all levels
  • Comprehensive glossary of frontend web development terms Comprehensive glossary of frontend web development terms
  • Covers key concepts and terminology related to HTML, CSS, JavaScript, responsive design, accessibility, and more Covers key concepts and terminology related to HTML, CSS, JavaScript, responsive design, accessibility, and more
View Terms