[SOLVED] Module CSS override

3 years 3 months ago - 3 years 3 months ago #322807 by AlexRag
[SOLVED] Module CSS override was created by AlexRag
I couldn't find anything in the forum....

I'm just wondering if modifying module css works the same way as the main CB template (i.e. Template plugin) or whether I need to manually created a override.css file where the module css file in question is

I am trying to modify this css that is found in /modules/mod_subcriptions/mod_cbsubscriptions.view.css file (CB Subscriptions Module)

These are the originals that I wanted to tweak:
div.modcbsubCurrent div {
    background: #FC9307;
    font-weight: bold;
    font-size: 90%;
    padding: 3px 1px 1px 4px;
div.modcbsubUpgrades div {
    background: #FC9307;
    font-weight: bold;
    font-size: 90%;
    padding: 3px 1px 1px 4px;

Whatever the answer is, would this apply to all the CB modules?

Thanks!

Please Log in to join the conversation.

3 years 3 months ago #322818 by krileon
Replied by krileon on topic Module CSS override
You can use CBs CSS override functionality for modules as well as in most cases CBs template CSS should be loaded for the module already, but you may need to add an extra selector to your CSS to make it strong enough to override the existing CSS in some cases.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

3 years 3 months ago #322825 by AlexRag
Replied by AlexRag on topic Module CSS override
Thanks Kyle.

In the case of my example noted earlier, what extra selector should I be looking for to change the CSS (eg. background color). This is in reference to the CB Subscription Module
div.modcbsubCurrent div {
    background: #FC9307;
    font-weight: bold;
    font-size: 90%;
    padding: 3px 1px 1px 4px;
div.modcbsubUpgrades div {
    background: #FC9307;
    font-weight: bold;
    font-size: 90%;
    padding: 3px 1px 1px 4px;

Attachments:

Please Log in to join the conversation.

3 years 3 months ago #322828 by krileon
Replied by krileon on topic Module CSS override
There's a parent div above those. You should be able to just target that. Example selector given more weight as follows.

FROM: div.modcbsubUpgrades div {
TO: .modcbsubEncl div.modcbsubUpgrades div {

The modcbsubEncl CSS class is on the container div for the entire modules output.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: AlexRag

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.218 seconds

Facebook Twitter LinkedIn