Keyword

K2 Image Size

  • Angela Bendall
  • Angela Bendall's Avatar Topic Author
  • Offline
  • New Member
More
11 years 6 months ago #111165 by Angela Bendall
K2 Image Size was created by Angela Bendall
I originally posted this on the Rockettheme forums but have not received an answer so I'm hoping for more luck here...it's something that I've been trying to fix for a week so would really appreciate some advice!
I have seen many discussions about similar problems but I just can't seem to resolve this one:

I am using K2 to publish Items.

I have defined the image sizes in K2 Parameters.

Rightly or wrongly, I have also set the Category 'Item Image Options' to the same values as in K2 Parameters.

The category itself is set to show 'Large' images for the first 2 items (width 325px), Medium for the next 6 items and so on.

I have uploaded an image to Joomla with dimensions 351x470px.

Problem 1:
For my Item, I inserted the above image using the 'Image' tab, hoping to see said image in the category listings. However, I have found that the image width is wider than the 325px that has been defined in the K2 parameters. In fact, it seems to fill the width of the container.

Problem 2 (similar):
In the Item view, the image is scaled up to 100% width, instead of showing at the defined Large dimensions.

I can see from the css that the image width is set to 'width: 100% !important' so am I correct in assuming that this is why the image is not being resized on my site?

If so, what is the best way to prevent this from happening? Do I still have to change the css even though I have set the dimensions that I require in K2? From other threads that I have read I can see that this issue crops up a lot, but I'm really stumped as to what to do now.

I already have a custom css file that is working on other sections of my site. However, using Firebug, I can see that even though I have attempted to change the styling for .catItemImage in my custom css file, it is not overriding the 'thirdparty-k2.css' file. I'm new to K2 and Joomla...should I simply make the required changes in 'thirdparty-k2.css' or would my changes be overridden by future template or K2 updates?

Affected page is www.cantrefgwaelodagility.org.uk/j/index.php/2013-03-04-20-25-03/latest-news

Any help would be gratefully received!

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #111166 by william white
Replied by william white on topic Re: K2 Image Size
In your link you are seeing the item view in category listing.
I would suggest that you switch templates to a default template and check the behavior there first.
Also, the columns you have set and the side bar may be affecting the actual width that is displaying.
If your template came with k2 overrides and k2 css already overridden or custom...be sure that you are using the correct version of k2 that was installed with the template as the overrides have changed somewhat lately from version to version (mostly affecting the extra fields display)

Please Log in or Create an account to join the conversation.

  • Angela Bendall
  • Angela Bendall's Avatar Topic Author
  • Offline
  • New Member
More
11 years 6 months ago #111167 by Angela Bendall
Replied by Angela Bendall on topic Re: K2 Image Size
Well, I had two issues...
The first was was a really silly mistake in that I had two copies of my custom.css available. I was updating the incorrect one and wondering why my code was not taking effect on the site. Oh dear. Problem solved.

The second issue was that I needed to add the following code to my custom.css. Here it is for those with similar issues:
Log in  or Create an account to join the conversation.