Hi,
how can i make the same of <?php echo $this->item->imageWidth; ?> for height?
how can i make the same of <?php echo $this->item->imageWidth; ?> for height?
William White wrote:Please tell us more about what you are trying to do. What file are you working with?
When K2 resized images you specify the width, and it sizes them accordingly and scales them. The height is not adjustable, and i always crop my pictures to fit these requirments first.
If you want them all to turn out the same, crop them all the same.
William White wrote:Crop all of your images to the same size before uploading and they will all turn out the same heigth
<? php
if ($ this-> item-> imageheight> = $ this-> item-> imagewidth)
{
echo "style = \" width: auto; height: 80px; \ "";
}
else / / IF
{
echo "style = \" height: auto; width: 100px; \ "";
}
?> />
<? php
if ($ this-> item-> imageheight> $ this-> item-> imagewidth)
{
echo "H". $ this-> item-> imageheight. "-". $ this-> item-> imagewidth;
Else {}
echo "L". $ this-> item-> imagewidth. "-". $ this-> item-> imageheight;
}
?>span.catItemImage img {
max-height:80px;
max-width:100px;
}Log in or create an account to reply.