How to set maximum height for $img but keep proportions

Chris picture Chris · Dec 22, 2009 · Viewed 42.3k times · Source

How to set maximum height or width for:

$img_attributes= ' height=100 width=100 '. 'alt="'.$product['product_name'].'"';

Answer

Pekka picture Pekka · Dec 22, 2009

Well, there are the max-height and max-width CSS properties, aren't they? THey work in all major browsers except IE 6 and in IE 7.