I created a picture grid and for some reason the pictures aren't responding to the max width and max height rules.
I made up the class
.sizedimg {
max-width:100%;
max-height:100%;
}
To size the images so that they would be in their natural state, but I want them to fix in the max-height 350px;
and min-height 350px;
This is my html for it. I am trying to enclose the image in 'productpiccontainer' so that the pic won't exceed that div, but it is taking up the entire area of the class 'item'
<div class="item">
<div class="productpiccontainer">
<?php echo "<img class='sizedimg' src='productpics/".$product['img'] ."' alt='Product Pic'>"; ?>
</div>
<p><?php echo "<a href='./viewProduct.php?view_product=$id'>" . $product['product_name'] . "</a>"; ?></p>
<p> <?php echo "$" . $product['price']; ?> </p>
</div>
I created a fiddle....https://jsfiddle.net/39qy0zdh/
But, for some reason it really isn't showing what is happening. So, if anyone would like to see a live example of this, my site is buyfarbest.com . There if you click on the products tab, you will see exactly what I mean. If you look at the empty product item on the right, that is how I am trying to format this, with the picture being in the inner border.
Anyone have any idea why this isn't working for me?