For max-width to work correctly, your element first needs a certain width. Use 100% to achieve what you want. See here:
http://jsfiddle.net/QsHa9/
For max-width to work correctly, your element first needs a certain width. Use 100% to achieve what you want. See here:
http://jsfiddle.net/QsHa9/