Where do i define a class for a specific button

Hi there

just a simple question - where can I define a class for a specific button in X-Theme with Cornerstone?
I know, there is the field “Class” in the button element, but where do I have to do the styling?

Thank you very much

Hi there,

It depends if you are using the Classic Button or V2 Button element.

Add the class to the class field then go to X > Theme Options > CSS:

.x-btn.the-button-class {
    background-color: #000;
    color: #fff;
    border: 1px solid #efefef; 

The code above assumes that the class you have added to the button is the-button-class. Feel free to change it depending on the class you have added. You may also further change the code above.

For v2 button element, there are more settings avaiable to this element so there is less chance that you will need to further add some custom CSS.

In case you want to, you can add the a class to the class field then use this selector:

.x-anchor-button.the-button-class {


Just like the previous suggestion, you may add the CSS code in the Global CSS.

Another option for the v2 element is to use the Element CSS. If you use the element CSS option, you do not need to add a css class to the element. You will just need to place the code directly to the Element CSS option.

Please check this link for further information about the Element CSS:

Hope this helps.

Hi Jade

Thank you very much for your help. It works perfect! :grinning:

You are most welcome. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.