Keyword

What Sets Height of div.subCategory

  • Timothy Michel
  • Timothy Michel's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 4 months ago - 10 years 4 months ago #128713 by Timothy Michel
What Sets Height of div.subCategory was created by Timothy Michel
I want to set the height for the subCategory class for all K2 Category Menu types to <div class="subCategory" style="height: auto"> but I don't know where that is done in php. What file calculates the height for the subCategory div's in K2?

I can do this in CSS, but I want to do this in php so that I can eliminate something like style="height:269px" in <div class="subCategory" style="height: 269px;"> and replace it with <div class="subCategory" style="height: auto"> or eliminate the inline style altogether and replace it with an entry in k2.css. I am trying to reduce my file sizes, so eliminating either the inline css or the k2.css entry would be helpfull.

It appears to me that all subCetagory heights are set to the height of the tallest subCategory div under div.subCategoryContainer. There must be a php file in K2 that does this. I would like to modify it's behavior for responsiveness sake.

See: www.jsandbox.org/evidence/videos.html

Any thoughts anyone?

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

More
10 years 4 months ago #128714 by Lefteris
Replied by Lefteris on topic Re: What Sets Height of div.subCategory
Hi. K2 applies an equal height function using javascript. If you remove the class name "subCategory" then the script will not get executed. However you will have different height on each column depending on content.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Timothy Michel
  • Timothy Michel's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 4 months ago #128715 by Timothy Michel
Replied by Timothy Michel on topic Re: What Sets Height of div.subCategory
Can I modify the JavaScript function and add some conditions to it? Where is it located, what is the name?

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

More
10 years 4 months ago #128716 by Lefteris
Replied by Lefteris on topic Re: What Sets Height of div.subCategory
No modifying core files is a bad idea. You will lose all your changes in the next update. If you want to add custom code you should always use your template files. As i already told you, you can disable that behavior by removing the class name "subCategory" from your markup.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Timothy Michel
  • Timothy Michel's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 4 months ago #128717 by Timothy Michel
Replied by Timothy Michel on topic Re: What Sets Height of div.subCategory
Thanks again, that will suffice, as I don't know of any condition where I want subcategory containers to be of uniform height. Item containers are of uniform height and they are distinct from subcategory containers. I get the uniform height for items by setting min-height and then judiciously positioning the "read more" page break. Kind of cluggy, but it works, and when the column narrows the container grows in height; no overflow condition.

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

More
10 years 4 months ago #128718 by Lefteris
Replied by Lefteris on topic Re: What Sets Height of div.subCategory
Yes but if an item has more text than others the min-height will not work.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
9 years 6 months ago #142498 by Anthony
Replied by Anthony on topic Re: What Sets Height of div.subCategory
hi

ok but we really need a solution for this on my side its the same in category view
i coudnt fix or have all well uniform ..

www.kubevent.fr/fr/prestations

how could we fix this ?

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

More
9 years 6 months ago #142499 by Anthony
Replied by Anthony on topic What Sets Height of div.subCategory
i found a different post with the same problem so the JS youre searching is here :

joomlaworks.net/forum/k2-en/35206-k2-subcategory-spacing-problem

but it didnt solve the problem for not modify the core files ...
another way to have this using CSS .?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 6 months ago #142525 by Krikor Boghossian
Replied by Krikor Boghossian on topic What Sets Height of div.subCategory
I can see all the containers have the same height.
If you want to edit the template so each image has the same height, you need to edit your template's css.
If you have questions about your template overrides or stylesheets you need to address them to the template's developer.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum