Support Forum

Please note that this forum is only available to you in read only mode. In order to contribute to this conversation you will need to renew your subscription.

Override K2 css file

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Hello,
I can’t override the default css file from the component K2 :huh:

I’ve tried with the CSS4K2 plugin (YouTube tutorial) and then with these explanations and the zip file to download but in both cases the new css file is never loaded.

Could you please try on your side and tell me if it works?

Thank you
  • Lorenzo's Avatar
  • Lorenzo
  • LIfetime Developer - Big Bamboo
  • 369 posts
  • 11 Thanks
  • Karma: 2
Last Edit: 9 years 1 month ago by Lorenzo.
The administrator has disabled public write access.
Hi,

You can add a custom.css file to your template and add any overrides to that file.

For help with the css4k2 plugin you would need to get in touch with the developers.

Regards,

Rob
  • Robert Went's Avatar
  • Robert Went
  • Moderator
  • 2210 posts
  • 196 Thanks
  • Karma: 90
The administrator has disabled public write access.
Hello,
I saw that you publish also templates with K2 preinstalled so I thought you had an answer to this problem...

Do you think it's better to use the custom.css file of the template instead to override the css file of K2?

Thank you
  • Lorenzo's Avatar
  • Lorenzo
  • LIfetime Developer - Big Bamboo
  • 369 posts
  • 11 Thanks
  • Karma: 2
The administrator has disabled public write access.
Hi,

Using the custom.css file does override the k2 css file as it is loaded last on the page.

We have zenkit which provides different templates for k2 and each come with their own styling. This is what is shown on the demo sites.

If you want to override the styling of zenkit it is best to do it in the same way in the template as it keeps all your css modifications together and prevents then from being overwritten when anything is updated.

Regards,

Rob
  • Robert Went's Avatar
  • Robert Went
  • Moderator
  • 2210 posts
  • 196 Thanks
  • Karma: 90
The administrator has disabled public write access.
... I just found this post on the K2 forum and apparently the solution is to move the file in templates/YOUR_TEMPLATE/css/k2.css ...and it works!

... so simple? :silly: :side: ... I lost two hours to find a solution :( :(
  • Lorenzo's Avatar
  • Lorenzo
  • LIfetime Developer - Big Bamboo
  • 369 posts
  • 11 Thanks
  • Karma: 2
The administrator has disabled public write access.
It depends really on what you are changing - As rob suggested using the custom css

For more information on options available check out

docs.joomlabamboo.com/zen-grid-framework-4/theme/customisation.html

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers