SimpleCSS
Download

๐Ÿ–ผ๏ธ Images

๐Ÿ“ What are image utilities used for?

Image utilities help control how images behave inside responsive layouts. They ensure proper scaling, preserve aspect ratio, provide fluid resizing, and offer a built-in thumbnail style. These helpers allow you to use images cleanly across cards, articles, galleries, grids, or responsive layouts without custom CSS.

๐Ÿ’  Examples

Here are some examples showcasing each utility:

Base image
.img
Responsive image
.img-responsive
Fluid image
.img-fluid
Thumbnail image
.img-thumbnail

๐Ÿ’ป HTML Code

Base image
.img-thumbnail
Responsive image
.img-thumbnail
Fluid image
.img-thumbnail
Thumbnail image
.img-thumbnail

๐Ÿ“ Image Utilities Reference

Below is the complete reference for all available image utilities.

.img

Base image class applying a global border-radius using --img-border-radius.

.img-responsive

Makes the image fully responsive: max-width: 100%, height: auto, and object-fit: cover.

.img-fluid

Scales the image to fit its container width while maintaining proportions, similar to Bootstrapโ€™s .img-fluid.

.img-thumbnail

Wraps the image in a padded box with border and background: useful for previews, galleries, and UI components.

โš™๏ธ Variables CSS

Variable Description
--img-border-radius Border radius applied to images.
--img-thumbnail-bg-color Background color of thumbnail images.
--img-thumbnail-border-color Border color of thumbnail images.
--img-thumbnail-border-style Border style of thumbnail images.
--img-thumbnail-border-width Thickness of the thumbnail border.
--img-thumbnail-padding Padding inside the thumbnail container.