In modern responsive webpages, the resize image property is used to resize an image automatically in order to fit the div container. In order to create the resize image property, we use the max-width
property in CSS.
This property has no effect if the height and width are already defined in the HTML.
image
{
max-width:100%;
height:auto;
}
We use
height:auto
in the syntax to override any height attribute already defined for the image.
max-width
property to define the maximum width of the image.RELATED TAGS
CONTRIBUTOR
View all Courses