Resolved

CSS and ID

Ultra Theme started by Nube Nov 24, 2016 5 replies
Nube Nov 24, 2016 · 5:47 pm #5545

A very simple question, sorry for the question but I am a newbie with wordpress and visualbuilder. What’s the best place to add css for the object like widget, row and column? is it better to edit the css file (using a child theme as I am doing right now) or is it better to use the property fields of the visual editor? And speaking about the visual editor (the layout builder widget) when you edit an object (row, column or whatever it is), there are two properties, i have the options in italian so I’ll do my best to translate them in english: “widget’s class” and “css styles“. If I add a class to a widget using the “widget’s class“, have I to give the name using this syntax: “.class_name” (with the dot) or simply this way?: “class_name

Andrew Misplon Puro Nov 24, 2016 · 5:51 pm #5546

Hi Nube

If you add a class name there must be no period, for example:

my-class-name

You can then target that class in your child stylesheet or Custom CSS plugin:

.my-class-name {
color: red;
}

If you use the CSS Styles field you must only write declarations (property and value) with no ;. For example:

color: red
font-size: 20px

It’s easier to use class names and there will be a wider application. Using your browser’s code inspector is very important in the process, especially if your rules don’t take effect.

Hope this helps.

Nube Nov 24, 2016 · 5:54 pm #5547

ok thanks, so the best way is to assign a name using the widget’class and then style it in the css file of the child theme, right? 🙂

Andrew Misplon Puro Nov 24, 2016 · 5:56 pm #5548

Yes, that gives you the most flexibility and also a wide application. You can make a change in one place and have it impact many widgets/pages in the future.

Nube Nov 24, 2016 · 5:58 pm #5549

Thanks 🙂

Andrew Misplon Puro Nov 25, 2016 · 12:30 pm #5553

For sure.

6 posts