Dentalia has now been updated to 2.3 and a major update for Recycle is coming soon. We hope you enjoy the new features! Thanks for your patience!

Okay
  Public Ticket #2706617
Styling a link in the Contact heading
Closed

Comments

  •  3
    vapovix started the conversation

    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

  •  564
    OrionThemes replied

    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"

    3317925572.png


    Then set the color with CSS (Copy it to Theme Options -> Custom CSS):

    .unique-class-name {
        color: red!important;
    } .unique-class-name:hover {
        color: purple!important;
    }


    And you have the result (bottom example is on hover):

    1417061972.png

    Some of color classes are alredy defined and you don't need to write CSS for them, for example, if you want it to be the theme primary color, you can use the "primary-color" class:

    1364574788.png

    Kind regards,

    Andrej

  •  3
    vapovix replied

    Worked like a charm!

    But why does the CSS go in the Theme Options and not in the Widget Styles CSS Declarations?

  •  564
    OrionThemes replied

    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