- Posts: 1
COMMUNITY FORUM
K2 subcategory spacing problem
- Scott
- Topic Author
- Offline
- New Member
Less
More
10 years 7 months ago #124162
by Scott
K2 subcategory spacing problem was created by Scott
I have a page displaying sub categories of a k2 category. For some reason each subcategory looks like this:
<div class="subCategory" style="height: 320px;">
They height is causing the page to look strange and I can't find anywhere in the template or code that is causing this style to be added. Any idea where I should look?
Here is the page with the problem:
dadswithapps.com/performanceplus/index.php/classes-menu
<div class="subCategory" style="height: 320px;">
They height is causing the page to look strange and I can't find anywhere in the template or code that is causing this style to be added. Any idea where I should look?
Here is the page with the problem:
dadswithapps.com/performanceplus/index.php/classes-menu
Please Log in or Create an account to join the conversation.
- Yiota
- Visitor
10 years 7 months ago #124163
by Yiota
Replied by Yiota on topic Re: K2 subcategory spacing problem
This height comes from a javascript. You can either rename the subCategory to something else in your K2 template override (read here getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates on how overrides work and modify it in category.php file), or modify the k2.js file located in folder components/com_k2/js/k2.js and remove the .subCategory class from this block of code.
If you chose to make the modification in the javascript file make sure to keep a backup of the file when a K2 update occurs.
// Equal block heights for the "default" view
$K2(window).load(function () {
var blocks = $K2('.subCategory, .k2EqualHeights');
var maxHeight = 0;
blocks.each(function(){
maxHeight = Math.max(maxHeight, parseInt($K2(this).css('height')));
});
blocks.css('height', maxHeight);
});
If you chose to make the modification in the javascript file make sure to keep a backup of the file when a K2 update occurs.
Please Log in or Create an account to join the conversation.
- Anthony
- Offline
- New Member
Less
More
- Posts: 5
9 years 6 months ago #142503
by Anthony
Replied by Anthony on topic Re: K2 subcategory spacing problem
Hi
In order to modify it in the category.php file in the Mytemplate/html/com_k2/default file what modify for this problem of height ?
i have tried to delete this height:auto but it seems its always the same result with unsollited bland space between rows ...
www.kubevent.fr/fr/prestations
In order to modify it in the category.php file in the Mytemplate/html/com_k2/default file what modify for this problem of height ?
i have tried to delete this height:auto but it seems its always the same result with unsollited bland space between rows ...
www.kubevent.fr/fr/prestations
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 6 months ago #142527
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Re: K2 subcategory spacing problem
You add .subCategory { height: auto!important; } to your stylesheet if you want to reset the equal heights, without removing any classes.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.