Hi.
I’ve created a custom code block with text that is supposted to be formatted different within the visual editor. I’m trying to use css code that is not defined in the css-files of the wp-theme, and just put most / all of the needed css into the visual editor.
Thus I would like something like:
Headline
11111111
[email protected]
Employees
Department 2
[email protected]
222222
Emplyees dep 2
Where I would like to specify the css class of css-class-test1 within the visual editor, but that doen’t seems to work. Is it not possible to define classes in the visual editor under the widget style -> css-styles for the text within visual editor?
I’ve been able to use css that is not defined in a class, then the css code get used on the whole of the visual editor witch is not what I would like to accomplish.
Hi Lhlied,
Yes, it’s possible to use Widget Class to set a class that can be used to affect CSS added in that widget but you specifically need to target that to do this.
If you do not wish to add the CSS externally, you should add it using a Custom HTML Widget rather than a Visual Editor.