Powered by NeGD | MeitY Government of India® UX4G
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 thumbnails #
You can give an image a rounded 1px border using .img-thumbnail in addition to our border-radius tools.
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
Result
Result
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>.