K2 images - height limit

Feel free to talk about everything related to our Joomla Products
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Sun May 06, 2012 1:36 am
Hi,

Does anybody know how to limit the height of the images for K2 items?

I am uploading some items, but the portrait files seem to be blown out of proportion in comparison to my landscape items.

Any assistance is much appreciated.

Thanks :)
User avatar
Gold Boarder

GK User
Sun May 06, 2012 6:01 pm
Hi

Unfortunately K2 doesn't have crop feature on images and that would be impressive addon on K2 component. Maybe we can see this added on future version by K2 Developers.

Setting a fix height to the image it's not a good idea, because the image would be resized and don't look very well... but you can do this trick.

On K2 article item view, you can limit the item Image Block by adding this line on override.css file (don't forget to enable this file on template parameters):

Code: Select all
.itemImageBlock {height: 250px; overflow: hidden}


It makes the same effect of crop image without messing the image quality.

Cheers
User avatar
Platinum Boarder

GK User
Sun Jun 24, 2012 8:13 pm
Hi,

Thanks for your reply.

Is the override.css located here:

\templates\gk_mystore\css

Also, how do I enable this on the template parameters.

Your help is much appreciated.

Prit
User avatar
Gold Boarder

GK User
Tue Oct 01, 2013 5:02 pm
Thanks a lot for this solution. But how can I center image vertical? Vertical-align: middle doesn't work...
User avatar
Fresh Boarder

GK User
Tue Apr 01, 2014 11:24 pm
Hello,
I got the same question as the last. How do I/we center the images vertically?

Here is my url: http://gorast.com/HOSTmaster/luxintegra ... 2/otvoreni

Thanks,
Gorast
User avatar
Platinum Boarder

GK User
Thu Apr 03, 2014 12:47 am
Hi,
I managed to do somekind of workaround with the code:

Code: Select all
.itemImageBlock img {
  position: relative;
  top: -49px !important;
}


but why when I enter in %, after he page is loaded its still on old position but when I edit the css with firebug, and change anything else, the image centers.

Thanks,
Gorast
User avatar
Platinum Boarder


cron