A pure CSS solution with no wrapper div
or other useless code:
img {
object-fit: cover;
width: 230px;
height: 230px;
}
More Related Contents:
- Black image fade over image [duplicate]
- When to use IMG vs. CSS background-image?
- Fill SVG path element with a background-image
- Change color of PNG image via CSS?
- Is element block level or inline level?
- Removing whitespace between HTML elements when using line breaks
- Should I specify height and width attributes for my IMGs in HTML?
- Embed image in a element
- Make an image responsive – the simplest way [duplicate]
- How can I make all images of different height and width the same via CSS?
- How to hide image broken Icon using only CSS/HTML?
- CSS image resize issue
- Floating an image to the bottom right with text wrapping around
- CSS image resize percentage of itself?
- img tag displays wrong orientation
- How does one use the onerror attribute of an img element
- Image scaling causes poor quality in firefox/internet explorer but not chrome
- CSS: How can I set image size relative to parent height?
- How to change an image on click using CSS alone?
- How to make images stay within the rows of a css grid container?
- How to replace color of PNG image using CSS? [duplicate]
- How to strike through obliquely with css
- How can I resize an image to a percentage of itself with CSS?
- Responsive image align center bootstrap 3
- CSS Border on PNG image with transparent parts
- Make Bootstrap’s Carousel both center AND responsive?
- Why use a sprite sheet rather than individual images?
- Use the HTML tag as a background image instead of the CSS background-image property?
- How to center image in a div horizontally and vertically
- Is it possible to set a src attribute of an img tag in CSS?