Use max() to set the width of #div1 to whichever is largest: 50% or 300px.
Resize the browser window to see the effect!