DEV Community

kundalkr
kundalkr

Posted on

can anybody can tell me how i make reponsive image in css ?

Top comments (4)

Collapse
 
just_sunny_girl profile image
-IRODA- • Edited

There are lot of ways to make image responsive.
Main property is {max-with |max-height: 100%} to the image
Also useful are {overflow:hidden}
Read about "object-fit" property. With widths, flex and grid-props you can make images responsive without media-queries and bootstraps (it is a little bit extra).
And you can use images as background-image of block (if it is for decoration purpose, isn`t important for content ) and use background-size, background-position and etc

Collapse
 
kundalkr profile image
kundalkr

Can you tell me in detail?

Collapse
 
denniswebdel profile image
dennisFS

You can use CSS media queries to make anything responsive...
Checkout w3school doc about media queries here 👇
w3schools.com/css/css_rwd_mediaque...

Collapse
 
alanalvarez5 profile image
Alan Alvarez

You can use a grid system with bootstrap