Skip to content

Sizing

Sizing utilities set width and height as a percentage of the parent (w-25 to w-100, h-25 to h-100, plus w-auto and h-auto), cap them with mw-100 and mh-100, or relate them to the viewport with vw-100, vh-100, min-vw-100 and min-vh-100.

1Width percentages

w-25, w-50, w-75, w-100 and w-auto relative to the parent.

w-25
w-50
w-75
w-100
w-auto

2Height percentages

h-25 to h-100 relative to a parent with a fixed height.

h-25
h-50
h-75
h-100
h-auto

3Max width 100

mw-100 keeps a wide element from overflowing its parent.

The small habits that make a big difference
mw-100 on a 900px wide image

4Max height 100

mh-100 limits a child to the height of its parent.

Travelling with kids: our tried and tested tips
mh-100 keeps the 300px image inside the 120px box.

5Full width button

w-100 turns a button into a block that fills its column.

Vineyard stay
$69.95

6Progress bars with widths

Width utilities on the inner bar of a meter.

Flexible dates25%
Curated stays50%
Free cancellation75%

7Equal height cards

h-100 on cards inside a row makes every card as tall as the tallest.

Bright journey powerful
Start in minutes and get help from a real person whenever you need it. We measure success by how many travellers come back and tell their friends.
We listen first, then build a plan around what you actually need.

8Half width on desktop only

w-100 on phones; the grid column col-md-6 does the narrowing from md, so the form stays readable.

9Full height split

Two panes with h-100 inside a fixed height container.

w-25 h-100
w-75 h-100

10Viewport units (preview)

vw-100, vh-100, min-vw-100 and min-vh-100 size elements to the viewport; shown here as a reference table.

ClassSetsTypical use
vh-100height: 100vhfull screen hero
min-vh-100min-height: 100vhsticky footer layout
vw-100width: 100vwedge to edge strip
min-vw-100min-width: 100vwwide canvas

11Auto width in flex

w-auto lets an input shrink to its content inside a flex row.

12Image fills its column

w-100 on an image makes it scale to the column width.

Three days in Lisbon, hour by hour
How to pack for two weeks with one bag

13Half width centred

w-50 with mx-auto centres a narrow block.

w-50 mx-auto

14Stat bars

Horizontal bars with width utilities compare four values.

  • Priya
  • Lucas
  • Owen
  • Arjun

15Vertical bar chart

h-25 to h-100 bars in a fixed height chart area.

MonTueWedThuFri

16Fixed size icon tiles

Fixed inline sizes plus flex centring for square icon tiles.

17Search bar width

w-100 on phones and w-50 from md via a responsive column, centred with mx-auto.

18Sidebar and content

A narrow fixed sidebar and a flex-grow-1 content area that takes the rest.

90px
flex-grow-1: Thousands of travellers already trust us, and we work hard to keep it that way.

19Responsive image height

h-auto with w-100 keeps the aspect ratio when the width changes.

Trips designed around you

20Width per column item

Labels with w-25 align a description list without a grid.

Name
Lucas Harlow
Email
sofia.larsen@example.com
City
Vancouver