Flex

The MIZ framework uses the powerful capabilities of Flexbox to organize and arrange page elements. Flexbox allows you to easily control the layout and order of elements within a container. With MIZ's Flexbox classes, you can create responsive and flexible designs effortlessly.

Basic Flexbox Classes #

In MIZ, to use Flexbox, you can utilize the following classes:

Usage #

To use Flexbox classes in MIZ, follow these steps:

  1. Apply the d-flex class to the container:
  2. Use direction and alignment classes:
  3.                     <div class="d-flex">
      <!-- Children go here -->
    </div>
                        
                        

    HTML

                        <div class="d-flex flex-row justify-content-center align-items-center">
      <div>
        <!-- First element -->
      </div>
      <div>
        <!-- Second element -->
      </div>
    </div>
                        

    HTML

Practical Examples #

Example 1: Row with elements centered

                  <div class="d-flex justify-content-center">
  <div>
    <!-- First element -->
  </div>
  <div>
    <!-- Second element -->
  </div>
</div>
                  

HTML

Example 2: Column with elements aligned to the top

                  <div class="d-flex flex-column align-items-start">
  <div>
    <!-- First element -->
  </div>
  <div>
    <!-- Second element -->
  </div>
</div>
                  

HTML

Custom Settings #

You can customize Flexbox classes based on your specific needs. To do this, you can use the MIZ configuration files and change the values of the Flexbox classes in miz/sass/config/_responsive.scss

Using Flex box in Design #

Using Flexbox in MIZ allows you to create flexible and responsive designs. By combining various classes, you can create layouts that display well on different screen sizes.

Key Points #