themecolor class in block HEADING
I have a HEADING type block and although I put the .themecolor class in the block, it pays attention to the class it has for the H3 (in this case).
If I place the class in the code inspector directly in the H, I get the class without problems, but the HEADING block does not allow me to do that, it places it in the upper DIV.
So?
How do I apply a class to an H without it having to be a text column?
(yes, I can put the styles of the key by hand in BeBuilder but it is not feasible if I have many headings)
Thank you.
Comments
Hi,
Are you familiar with a preset feature (released in version 23.0)?
You can create a preset with the color of your choice, and add it with two clicks to any other heading on your website.
It works even better than themecolor class because you do not have to write it in the Advanced tab. ?
Best regards
Thanks so much for the explanation. It is to be thankful.
I am familiar with "presets" although I have not used them yet.
On the subject of the class is what I need, as I say in the announcement: Put a class in a Heading (for whatever reason, since the example that you have given me was about a color, but if I have a class for other functionalities or another one that is not just a color or something different is not possible).
I guess the answer would be that if I need it for a JS I can use some ".className h2" type selector. Yes, I do take that into account.
But the ticket, above all, is to know how (or if it will be possible) to put a class so that it affects the "H", not the general Heading block.
Thanks!
You can add an asterisk symbol at the end of your class so it will affect the Heading tag without the need of pointing it out in the class declaration.
Thanks
Yes, I understand that and as a "patch" it's fine (which is what I mentioned above).
But what I need is that in the DOM it looks like this:
<div>
<div>
<h2 class="myClass">My Header</h2>
</div>
</div>
Not like this:
<div class="myClass">
<div>
<h2>My Header</h2>
</div>
</div>
I know that using a text column I can do it but from what I am programming I would like to know if it is possible from a HEADING block.
Thanks.
Without modifying the theme files it will not be possible.
The classes are assigned to the element's container, and there is no setting to change that.
Best regards
I understand.
Ok thank you very much for your time.