Text alignment and transformation

Using the grid system, we learned how to lay out a website's basic building blocks. However, generally we need an additional level of control that allows us to more finely align the content contained within these building blocks. This level of control is provided Bootstrap's text alignment classes:

  • text-justify: This justifies the text, so that it fills an entire area evenly (see Figure 2.24)
  • text-*-left: This aligns the text in the element to which this class is applied to the left on viewports of size * or wider, where * can be one of the following: xs, sm, md, lg, and xl
  • text-*-right: This aligns the text in the element to which this class is applied to the right on viewports of size * or wider, where * can be ...

Get Bootstrap 4 – Responsive Web Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.