Width

Utilities for setting the width of an element.

Quick reference

ClassProperties
.w-25width: 25%;
.w-50width: 50%;
.w-75width: 75%;
.w-100width: 100%;
.w-autowidth: auto;
.vw-100width: 100vw;
.mw-100max-width: 100%;
.min-vw-100min-width: 100vw;

Basic usage

Fixed width

Use w-{number} to set an element to a fixed width.

w-100
w-75
w-50
w-25
<div class="w-100">w-100</div>
<div class="w-75">w-75</div>
<div class="w-50">w-50</div>
<div class="w-25">w-25</div>

Auto width

Use w-auto to set width of an element to an auto.

w-auto
w-auto
<span class="w-auto ...">w-auto</span>
<div class="w-auto ...">w-auto</div>

Full viewport width

Use vw-100 to make an element span the entire width of the viewport.

<div class="vw-100 ..."></div>

Set mx width

Use mh-100 to set the maximum height of an element that is full, depending on the parent element.

<div class="mh-100 ..."></div>