![]() |
VOOZH | about |
We are given an HTML document (linked with Bootstrap) with a flexbox and a container. The goal is to stretch the flexbox to fill the entire container.
Table of Content
The .flex-fill class stretches the width of an element to fill the entire horizontal space. If there are multiple sibling elements on which this class is applied, the horizontal space is equally divided among them.
<div class="flex-fill"></div>Example: The example shows how to stretch the flexbox to fill the entire container in Bootstrap.
Output:
👁 ImageIn this approach, .flex-grow-1 stretch the element to its maximum width by giving the other elements (if any) only the necessary amount of space.
<div class="flex-grow-1"></div>Example: The example shows how to stretch the flexbox to fill the entire container in Bootstrap.
Output:
👁 Image