I want to set a default background color to custom widget when someone drag the widget to page in Elementor Page Builder.
2
If you have Elementor Pro you can add "Custom CSS" for widgets: https://elementor.com/help/custom-css-pro/.
You can then set these subset of widgets to display the correct background colour or gradient.
Example:
#widget { background: linear-gradient(to bottom right, black, grey); width: 750px; height: 250px; }
<div id="widget"></div>
Option 1: Just create a widget, save it as a template and call where you can add elements.
Option 2: add css in appearance->customize->Additional CSS
add class on the widget where you want to add bg color
.your-class{ background: linear-gradient(to bottom right, black, grey) !important; }
Click here to cancel reply.
2
Answers
If you have Elementor Pro you can add "Custom CSS" for widgets: https://elementor.com/help/custom-css-pro/.
You can then set these subset of widgets to display the correct background colour or gradient.
Example:
Option 1: Just create a widget, save it as a template and call where you can add elements.
Option 2: add css in appearance->customize->Additional CSS
add class on the widget where you want to add bg color