A NSW Government website
Design System v3.17.5

Float

Utilities for controlling the wrapping of content around an element.

Overview

These utility classes float an element to the left or right, or disable floating, based on the current viewport size using the CSS float property. !important is included to avoid specificity issues. These use the same viewport breakpoints as our grid system. Please be aware float utilities have no effect on flex items.

Float left on all viewport sizes

Float right on all viewport sizes

Don't float on all viewport sizes

Breakpoints

Responsive variations also exist for each float value.

Float right on viewports sized SM (small) or wider

Float right on viewports sized MD (medium) or wider

Float right on viewports sized LG (large) or wider

Float right on viewports sized XL (extra-large) or wider

All the supported classes

  • .nsw-float-left
  • .nsw-float-right
  • .nsw-float-none
  • .nsw-float-sm-left
  • .nsw-float-sm-right
  • .nsw-float-sm-none
  • .nsw-float-md-left
  • .nsw-float-md-right
  • .nsw-float-md-none
  • .nsw-float-lg-left
  • .nsw-float-lg-right
  • .nsw-float-lg-none
  • .nsw-float-xl-left
  • .nsw-float-xl-right
  • .nsw-float-xl-none