Change k2 image size using CSS only in category

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Fri Oct 18, 2013 2:48 pm
Reply with quote
Report this post
Hello. I'm trying to setup the image on the category list layout transforming it to a landscape image. If the uploaded image is 400px x 400px I want to see 400px x 200px applying a crop.

I've achieved it modifing the CSS and aplying a negative margin: margin: -150px 0px 0px -150px

It works very well but when i go to the item details, the image is also cropped.

Is there anyway to modify only the css bevaivour on the Category list ?

Thanks.
User avatar
Fresh Boarder

GK User
Fri Oct 18, 2013 3:15 pm
Reply with quote
Report this post
Could You please post an url to your site (link to category with image and single entry with image)?
User avatar
Moderator

GK User
Fri Oct 18, 2013 3:52 pm
Reply with quote
Report this post
Category list:

http://62.15.125.191:65/franatours/inde ... Itemid=708

The individual item is any of that list.

Thanks
User avatar
Fresh Boarder

GK User
Fri Oct 18, 2013 4:55 pm
Reply with quote
Report this post
I don't see those changes made by You. Are they live?
User avatar
Moderator

GK User
Mon Oct 21, 2013 9:45 am
Reply with quote
Report this post
When i sent the reply, i deleted the changes i did. Now i ave applyed again the changes:

What i Modified:
k2.css at line 89:
margin: -120px 0px -120px 0px;

Now you can see the images are cropped. I want to modify only the css behaivour on the category list not on the items details also.

Thanks
User avatar
Fresh Boarder

GK User
Mon Oct 21, 2013 6:59 pm
Reply with quote
Report this post
1. You should not edit core files, use override.css instead:
/templates/gk_rockwall/css/override.css and add all changes to it.

Remember to enable "CSS override" in template settings - advanced section.
User avatar
Moderator

GK User
Mon Oct 21, 2013 7:01 pm
Reply with quote
Report this post
2. The correct selector should be done this way:
Code: Select all
#itemListLeading .itemImageBlock img {margin: -120px 0px -120px 0px;}

it should address only images on category list.
User avatar
Moderator


cron