Different CSS classes to same headers


I have two titles on my webpage tagged as H2 and they share the same style (text size, font, color…) but I see that they have different CSS classes, the first one refers to the “h2-style” class, the second one to “h2-2-style”. I want the two titles to be absolutely identical in style so can I apply the “h2-style” to both? If yes, how can I delete the “h2-2-style” class?

Thanks very much!

If you add an H2 bric to the page, it will not ordinarily have a custom class attached. However, if you change the font, size etc, a style called h2-style will be created automatically. This is because your changes are overriding the standard h2 style associated with your site.

If you add a second H2 style in a different bloc, and again adjust the font etc. another style will be created called h2-2-style. To prevent this from happening, don’t make any adjustments to the font size etc on the new heading. Instead, just apply the original H2 style to the new heading. Just type h2 in the classes field and you will see a list of classes beginning with H2. Blocs will ask you to confirm that you want to add this new freehand class to the heading you’re editing.

Any subsequent changes you make to that class will then be applied to all items where that class has been assigned.

Thanks, your explanation is super clear! I have another question: can I apply a custom class on multiple pages? Because when I try to do that, Blocs comes up with a pop-up regarding freehand styles.

Thanks again for your help.

Classes are available throughout your project on any page. The pop-up you see is simply advising you that you are adding a freehand style. These freehand styles are what get created when you change the styling of standard headings. If you want to avoid these message from appearing, you could create a custom class manually and use the class editor to set the styling attributes. You would then apply your custom class wherever you want it applied.

So what should I choose when I apply a class to a second element on the page and Blocs asks me if I want to create a freehand class? I haven’t understood what’s the difference between classes and freehand classes…

Thanks again for your help!