CSS classes not displaying
Support › MB Builder › CSS classes not displayingResolved
- This topic has 5 replies, 3 voices, and was last updated 6 years ago by
Anh Tran.
-
AuthorPosts
-
December 28, 2018 at 2:07 PM #12818
RedRanter
ParticipantI have just installed and purchased MB Builder, and created some simple fields that I want styled with a custom CSS class. I have managed to display the fields on the front end (although I think the documentation on this could be improved, as I bought MB Builder on the premise I wouldn't need to touch the php files).
However, the contents of the metaboxes are not displaying with the style of their custom classes. The custom CSS classes are added in the theme itself through Theme options, so I'm wondering if that might be a problem? The only tutorials I can see add the CSS directly in the .php file.
UPDATE - Adding CSS classes directly into the php file does work, but keen to hear what I might be doing wrong with the MB Builder custom classes field.
December 28, 2018 at 5:23 PM #12820Anh Tran
KeymasterHi, did you try adding CSS classes to the field via custom attributes? Go to tab Advanced, and add a new attribute, name it "class" and enter value = your custom CSS classes.
June 23, 2019 at 6:49 AM #15057Chris
ParticipantJoyce didn't reply, but I have the same issue(s). I agree with the lack of documentation for Builder, as opposed to doing it manually.
In this case, I did add a custom css class added via my theme (Customizr Pro) and it didn't work either in the Appearance Tab / Custom CSS or when I added it as an Attribute in the Advanced Tab. I tried applying it to a textarea field.
Is there something else that would work?
thanks,
chrisJune 24, 2019 at 11:16 AM #15061Anh Tran
KeymasterHi Chris,
Sorry for the lack of documentation. I'll keep adding them.
Regarding the CSS class, please add the class as in this screenshot:
https://i.imgur.com/G8yUX18.png
And you'll see this class here:
June 25, 2019 at 3:01 AM #15076Chris
ParticipantHi - I don't recognize that last screen shot, so I assume it's Gutenberg? I'm using the classic editor, so I did a "view page source", and my class wasn't there, even though I set it up the way you showed on the earlier screen.
However, since I want the formatting done on the users' screen, I was able to get what I need by formatting the [rwmb_meta id="zzzz"] in the editor.
I'm sure it will get easier and even more useful as I work through it. Thanks for your help.
chris
June 25, 2019 at 10:41 AM #15080Anh Tran
KeymasterHi Chris,
If you're using the classic editor, you'll see the class here:
https://i.imgur.com/931YMwn.png
Another note: you can add the CSS class simpler by going to tab Appearance and enter your class into "Custom CSS Class":
-
AuthorPosts
- You must be logged in to reply to this topic.