Change min-width with JavaScript

Click the "Try it" button to make sure that the DIV element's width never is below 400 pixels:

This DIV element has a defined width of 50%.

The width of this DIV element is 50% of its parent element.

Try resizing the browser window to see that width of this DIV element will grow/shrink along width the resizing.

But if you click the "Try it" button, yo will make sure that this DIV element does not get below 400 pixels in width.