<?php echo tep_image使这个响应[关闭]

i have the following statement in my php file

<div id="product-info-left-column"><?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image'] ); ?></div>

this gets the image from a database, now the image size is actually 300px x 600px, but i want it to be good for mobiles, so i need to figure out how to make this responsive.

i also have a css statement

#product-info-left-column {
max-width:300px;
float:left;
margin:0px 0px 0px 0px;
padding:20px 22px 20px 22px;
}

but unfortunately this doesnt control the image size either..

is there a better way of getting this to place the image on the page so its responsive

thanks in advance

}

Easiest workaround here will be using diffrent css selector in your stylesheet:

#product-info-left-column img {
max-width:300px;
float:left;
margin:0px 0px 0px 0px;
padding:20px 22px 20px 22px;
}

That is if php creates img tag. It will reduce your image width to 300px.