K2 Images in material (very big image)

GK User
Fri Jun 27, 2014 5:05 am
Hello!

I have small image (182x209px).
I load it in to material (K2).

But:
1. In category list it BIG
http://tort-ik.ru/retsepty
2. In material it VERY BIG
http://tort-ik.ru/retsepty/item/278-retsept-1

I'm trying to change image option in category (K2) to very small - nothing happened (only quiality was very-very low).
User avatar
Fresh Boarder

GK User
Fri Jun 27, 2014 6:41 am
By default template shows images in 100% wide to keep them responsive. If you want to display image in original size please add this code to override.css file in root/templates/gk_template_name/css directory :
Code: Select all
.itemImageBlock img { width: auto !important}

and then just remember to enable "Use override CSS" option in template advanced settings tab. But note that this may affect on other styles and responsive article view.
User avatar
Platinum Boarder

GK User
Fri Jun 27, 2014 9:39 am
I add this code. U can look (URL in 1st post) - image normal, but BLOCK not normal.
I think need too change width of block

.itemImageBlock > a {
display: block;
width: 100%;
}
User avatar
Fresh Boarder

GK User
Sat Jun 28, 2014 10:56 am
Yes your code should work because different of image place the selectors are different.
User avatar
Platinum Boarder

GK User
Sun Jun 29, 2014 4:55 am
I solved problem:

.itemImageBlock > a {
display: block;
width: 158px;
}

But after this, I removed out image from material (158px - small image)
User avatar
Fresh Boarder

GK User
Mon Jun 30, 2014 9:15 am
Forcing width in CSS cause that every image will have the same width no matter what option you choose in K2 settings :)
User avatar
Platinum Boarder


cron