Edit The Code:
See Result »
Try it Yourself - ©
w3schools.com
Set max-width of an Element:
This div element has a height of 100px and a max-width of 500px. Resize the browser window to see the effect.