Keyword

K2 CSS Module Overrides

  • Steven Johnson
  • Steven Johnson's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 8 months ago #108728 by Steven Johnson
K2 CSS Module Overrides was created by Steven Johnson
Can anyone explain or point me to any K2 Module Override Documentation? I am trying to figure out how the module CSS and overrides work.

On my site I am using CSS4K2 (by K2Joom) and it is working well for the component. For the modules I created this custom directory

/templates/TEMPLATENAME/html/mod_k2_content/newlook/

and modified default.php inside of it.

I am not sure how to implement the CSS changes.

Any suggestions?

Thanks! -- Steven

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

More
11 years 8 months ago #108729 by william white
Replied by william white on topic Re: K2 CSS Module Overrides
create a blank file called YourOverrideName_style.css and put it in the same folder as your override
Place the css blocks of code you want to change in the file.
Eaiser not to have to read the entire css file to make one change.
Try the !important tag if the changes are overridden by something else

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

  • Steven Johnson
  • Steven Johnson's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 8 months ago #108730 by Steven Johnson
Replied by Steven Johnson on topic Re: K2 CSS Module Overrides
Thanks for the quick reply and info.

That is what I have done but I the override css file is not being picked up.

Here are the files I have:
/templates/gantry/html/mod_k2_content/newlook/default.php
/templates/gantry/html/mod_k2_content/newlook/newlook_style.css

I have added:

.even {
background: none repeat scroll 0 0 #000000 !important;
border-bottom: 1px dotted #CCCCCC;
padding: 2px;
}

to newlook_style.css


When I look at the page source I see no reference to newlook_style.css

FYI this module is being displayed on the home page and not a K2 component page.


Any thoughts on what I could be overlooking?

Thanks! -- Steven

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

More
11 years 8 months ago #108731 by william white
Replied by william white on topic Re: K2 CSS Module Overrides
Check the documentation of css4k2 on both k2joom.com and jiliko.net
I think it is for the category overrides only. Have never tried it with a module.
To style a module differently you could use css suffix and add to k2 css code in yourtemplte/css directory

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


Powered by Kunena Forum