|

Images

Responsive images#

With .img-fluid, images in UX4G are made responsive. The picture is given the attributes max-width: 100%; and height: auto; to scale with the parent width.

Result
image

Image thumbnails #

You can give an image a rounded 1px border using .img-thumbnail in addition to our border-radius tools.

image

Aligning images #

Use text alignment classes or auxiliary float classes to align pictures. The .mx-auto margin utility class can be used to centre pictures at the block level.

Result
image image
Result
image
Result
image

Picture #

Be careful to apply the .img-* classes to the <img> and not the <picture> tag if you use the <picture> element to provide several <source> elements for a specific <img>.

Result
image