#Width
Classes to set the width of an element.
Class | Styles |
---|---|
w-0 |
|
w-px |
|
w-auto |
|
w-screen |
|
w-10p |
|
w-20p |
|
w-30p |
|
w-40p |
|
w-50p |
|
w-60p |
|
w-70p |
|
w-80p |
|
w-90p |
|
w-100p |
|
w-1 |
|
w-2 |
|
w-3 |
|
w-4 |
|
w-5 |
|
w-6 |
|
w-8 |
|
w-10 |
|
w-12 |
|
w-16 |
|
w-20 |
|
w-24 |
|
w-32 |
|
w-48 |
|
w-64 |
|
Classes to set the width of an element.
Class | Styles |
---|---|
w-0 |
|
w-px |
|
w-auto |
|
w-screen |
|
w-10p |
|
w-20p |
|
w-30p |
|
w-40p |
|
w-50p |
|
w-60p |
|
w-70p |
|
w-80p |
|
w-90p |
|
w-100p |
|
w-1 |
|
w-2 |
|
w-3 |
|
w-4 |
|
w-5 |
|
w-6 |
|
w-8 |
|
w-10 |
|
w-12 |
|
w-16 |
|
w-20 |
|
w-24 |
|
w-32 |
|
w-48 |
|
w-64 |
|
The w-{{value}}
classes gives an element a percentage based width.
<div>
<div class="w-20p">...</div>
<div class="w-40p">...</div>
<div class="w-60p">...</div>
<div class="w-80p">...</div>
</div>
The w-{{value}}
classes gives an element an absolute width.
<div>
<div class="w-8">...</div>
<div class="w-16">...</div>
<div class="w-24">...</div>
<div class="w-32">...</div>
</div>
The w-screen
class makes an element span the entire viewport.
<div>
<div class="w-screen">...</div>
</div>
The w-auto
class makes an element use a browser determined width. This is commonly used to unset a previously set width.
w-auto
<div>
<div class="w-auto">...</div>
</div>
All utility classes mentioned here support viewport based application. All you need to do is add a -<viewport>
at the end of the class(es) you are using. For example, use w-50p-md
to apply w-50p
on medium screens and above.
<div class="w-50p-md">
<!-- ... -->
</div>
For more information, visit the Viewports documentation.