Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

[SOLVED] What's the correct css to use to change font?

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
7 years 11 months ago - 7 years 11 months ago #290917 by fribse2011
I added this to the overrides
.cb_template {color: #000000;font-family: "Montserrat",sans-serif;font-size: 0.85em;}
but that also hit's the backend

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.
Last edit: 7 years 11 months ago by krileon. Reason: Added [SOLVED] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48710
  • Thanks: 8319
  • Karma: 1447
7 years 11 months ago #290924 by krileon
Replied by krileon on topic What's the correct css to use to change font?
The cb_template class surrounds all of CB. Frontend and backend alike. You need to make your selector more specific. Each view has a unique container CSS class in frontend or you can use a selector that includes a Joomla class to try limiting it to frontend only like body.site .cb_template as body.site is for frontend while body.admin is for backend.


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 or Create an account to join the conversation.

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
7 years 11 months ago #290938 by fribse2011
Replied by fribse2011 on topic What's the correct css to use to change font?
Ok, I tried finding a combination that worked, so far I've just taken each component, but it would of course be nice to just have a 'top class' define it for all cb things in the front end.
I've taken a snap of the css hierachy:

I tried using
.body.wrapper-website.cb_template {color: #000000;font-family: "Montserrat",sans-serif;font-size: 0.85em;}
but that didn't do it, so far I'm setting it for each part:
.cbProfile, .cbEditProfile, #cbActivity {color: #000000;font-family: "Montserrat",sans-serif;font-size: 0.85em;}

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.
Attachments:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48710
  • Thanks: 8319
  • Karma: 1447
7 years 11 months ago #290945 by krileon
Replied by krileon on topic What's the correct css to use to change font?
wrapper_website isn't on the body. It's on a div in the body. cb_template also isn't on wrapper_website. The below should work fine.

Code:
.wrapper-website .cb_template { color: #000000; font-family: "Montserrat",sans-serif; font-size: 0.85em; }

We're not going to add CSS classes to denote frontend or backend usage. That's what your template should be helping with, but your template doesn't have the standard "site" CSS class on the body.


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: fribse2011

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

  • fribse2011
  • fribse2011
  • OFFLINE
  • Posts: 921
  • Thanks: 79
  • Karma: 8
7 years 11 months ago #290969 by fribse2011
Replied by fribse2011 on topic What's the correct css to use to change font?
Thankyou very much Kyle, you should adhere to standards, and nothing else, my hope is that others will too :-)

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

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

Moderators: beatnantkrileon
Powered by Kunena Forum