Keyword

changes to k2.css file

  • Thierry
  • Thierry's Avatar Topic Author
  • Offline
  • New Member
More
12 years 9 months ago #60737 by Thierry
changes to k2.css file was created by Thierry
I have made a lot of changes to the k2,css file to get the styling I want to match my site. Each line changes has a comment so it can be easily tracked. Is this the correct way of doing it? The reason for asking is if k2 make an update the new k2.css file will override my changes and I will have to change it all over again.
Any advise greatly received.

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

More
12 years 9 months ago #60738 by troponin
Replied by troponin on topic Re: changes to k2.css file
you should use template overrides. So link in my Signature for more informations.

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

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
12 years 9 months ago #60739 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: changes to k2.css file
Hi Thierry,

As Thorsten Renz pointed out, its always good to use template override. For the css part, i will suggest to have a custom css file loaded last. Like add a css link to a specific file in your index.php. The browser will use the css values from this file. Even if you upgrade K2 the default css file will not replace your custom css file.

Eg: have a new css file in your template's css folder. like myfile.css and link to it in your index.php

K2 Rocks \m/

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

  • Thierry
  • Thierry's Avatar Topic Author
  • Offline
  • New Member
More
12 years 9 months ago #60740 by Thierry
Replied by Thierry on topic Re: changes to k2.css file

Thorsten Renz wrote: you should use template overrides. So link in my Signature for more informations.


I am using K2 v2.5.4 in Joomla 1.7.3 so there was no overide package. Having looked what it contained I copied k2.css (modified) to my template css folder. I then placed the original k2.css file back in the original k2 folder location. That worked so I do not have to touch the original k2.css file. Thank you for your advice.

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

  • Thierry
  • Thierry's Avatar Topic Author
  • Offline
  • New Member
More
12 years 9 months ago #60741 by Thierry
Replied by Thierry on topic Re: changes to k2.css file

Kannan Naidu wrote: Hi Thierry,

As Thorsten Renz pointed out, its always good to use template override. For the css part, i will suggest to have a custom css file loaded last. Like add a css link to a specific file in your index.php. The browser will use the css values from this file. Even if you upgrade K2 the default css file will not replace your custom css file.

Eg: have a new css file in your template's css folder. like myfile.css and link to it in your index.php


Thank you for your advice. I will also have a go at this, I assume I will have to give the classes the same name as the k2.css file otherwise there will be a lot of changes to do in categories/items.

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

  • Pocket Money Marketing
  • Pocket Money Marketing's Avatar
  • Offline
  • New Member
More
12 years 3 months ago #60742 by Pocket Money Marketing
Replied by Pocket Money Marketing on topic Re: changes to k2.css file
Thank you for this excellent advice. I wish I had read it before reinstalling the extension :(

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

More
12 years 3 months ago #60743 by Lefteris
Replied by Lefteris on topic Re: changes to k2.css file
Hi. If you place the k2.css file in your template css folder K2 will load your's instead of the core. So just copy the /components/com_k2/css/k2.css to /templates/YOUR_TEMPLATE/css/k2.css and make there the modifications you need.

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