Basically, this is because the Widget Styles CSS affects the entire widget. If you want to style a specific element inside the widget, you need to use a class.
Adding the code to Theme Options also allows you to style more widgets at once, so you don't need to add the same CSS over and over again. Just use the same class anywhere you want this style.
This is a huge time-saver. If you want to make some adjustments later, you can simply change the TO CSS without the need to edit all widgets separately.
What's the best practice to style a link in the heading of a SiteOrigin Editor widget?
i.e. on the demo "Request an Appointment" make the "Request" a link, with a different link color and hover color?
https://preview.themeforest.net/item/dentalia-dentist-medical-wordpress-theme/full_screen_preview/18404457?ref=orionthemes_com
Hi,
Generally you can always use the editor view, add a custom HTML class to an element then style this class with CSS.
Like the example below, which has a made-up class="unique-class-name"
Then set the color with CSS (Copy it to Theme Options -> Custom CSS):
And you have the result (bottom example is on hover):
Kind regards,
Andrej
OrionThemes
Worked like a charm!
But why does the CSS go in the Theme Options and not in the Widget Styles CSS Declarations?
Basically, this is because the Widget Styles CSS affects the entire widget. If you want to style a specific element inside the widget, you need to use a class.
Adding the code to Theme Options also allows you to style more widgets at once, so you don't need to add the same CSS over and over again. Just use the same class anywhere you want this style.
This is a huge time-saver. If you want to make some adjustments later, you can simply change the TO CSS without the need to edit all widgets separately.
I hope this explains it.
Kind regards,
Timea
OrionThemes