DEV Community

Dushyant Pathak
Dushyant Pathak

Posted on

2 2

Quick way to make an image responsive

Add the following to your image's style attribute.

<img style = "width: 100%; height: auto;" src = "some-image-source">
Enter fullscreen mode Exit fullscreen mode

If you want to set a max-width,

<img style = "width: 100%; height: auto; max-width: 200px;" src = "some-image-source">
Enter fullscreen mode Exit fullscreen mode

Cheers! Happy coding!

Top comments (0)

Image of Docusign

πŸ› οΈ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more