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!

Custom css Field

7 years 5 months ago #295924 by julie.prod.web
Custom css Field was created by julie.prod.web
Hi,

The css that is added to the fields cb (screenshot) works for all types of fields except for "CUSTOM HTML".
But I use these fields as Title and I would like to run the customized css.
Attachments:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48708
  • Thanks: 8319
  • Karma: 1447
7 years 5 months ago #295927 by krileon
Replied by krileon on topic Custom css Field
Works perfectly fine in my tests for Custom HTML. See the below screenshots. From your previous topic it was determined you were using a custom CB template and CB Profile Pro. I'm unsure if either could be causing your issue or if whatever CSS you're using on that selector doesn't have a strong enough selector specified.

Param:


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.
Attachments:

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

7 years 5 months ago #295928 by julie.prod.web
Replied by julie.prod.web on topic Custom css Field
I use Cb profile pro only for create a profile type at registration.
The problem is that my css works on all types of fields except the one.
Where did you put your css?
Also, can you put me a screenshot of your css code?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48708
  • Thanks: 8319
  • Karma: 1447
7 years 5 months ago #295932 by krileon
Replied by krileon on topic Custom css Field
The CSS you supply to style the class specified in the parameter has nothing to do with that parameter working or not. My guess is the CSS you're using has too weak of a selector. Example as follows for selector weight.

Weak: .myClass
Stronger: .parentClass .myClass

You can use CBs built in CSS override functionality shown below to add custom CSS to CB.

www.joomlapolis.com/blog/kyle/18711-template-css-overrides-made-easy


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.

7 years 5 months ago - 7 years 5 months ago #295955 by julie.prod.web
Replied by julie.prod.web on topic Custom css Field
Yes OK. But the problem is that I can not find the name of this field.
I use firebug and I don't see it.
For others field thera are ".cb_template .cbUserListFieldLine .cbUserListFieldTitle, .cb_template .control-label" etc...
But for the "CUSTOM HTML" field I don't find it.

So can you help to find the ".parentClass ." ?
Last edit: 7 years 5 months ago by julie.prod.web.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48708
  • Thanks: 8319
  • Karma: 1447
7 years 5 months ago #295989 by krileon
Replied by krileon on topic Custom css Field
The parent class doesn't have to be the name of the field. It can just be a CSS class of an element above it. Right click and inspect element on the field to open your browsers developer console then review the HTML structure for available CSS classes. I've no idea what CSS you're trying to change so how strong your selector needs to be is relative to the style you're trying to override, but the below might be strong enough.

.cb_template .cbFieldsContentsTab .myClass

Note CB does not add field name as a CSS class. Field type is added as a CSS class and field ID is added as an id attribute.


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.

Moderators: beatnantkrileon
Powered by Kunena Forum