cancel
Showing results for 
Search instead for 
Did you mean: 

Custom CSS for Radio Button component

former_member184594
Active Contributor
0 Kudos

Hello all,

I have a question I want to change the text color of radio button from black to white by CSS. How is this possible?

I have been trying it for a while, but no luck.

Could anyone help me on this?

Many thanks.

Accepted Solutions (1)

Accepted Solutions (1)

mike_howles4
Active Contributor
0 Kudos

.sapUiRbStd { color : #FFFFFF; }

former_member184594
Active Contributor
0 Kudos

Hi Michael,

I created a custom css with the css code you posted and set the CSS class of the radio button sapUiRbStd. However, nothing happens. The color of the radio button does not change at all.

Am I doing something wrong?

mike_howles4
Active Contributor
0 Kudos

You do not need to set the class to sapUiRbStd - That is already set standard by the Radio Button Group component.  You may need to clear IE cache and restart Design Studio to see the change.

former_member184594
Active Contributor
0 Kudos

That didn't work but I did it like this:

.sapUiRb > label {color: #FFFFFF }

This sets the color of all radio buttons on the dashboard to white, but  I just want to change only one radiobutton.

Is this possible?

Also, what other sapUi css tags exist? I mean for the other components. How can I find the others?

mike_howles4
Active Contributor
0 Kudos

To highlight the second radio button of a Radio Button Group component:

.sapUiRbG span:nth-child(2) {color: #FFFFFF}

Use IE F12 tools at runtime to familiarize yourself with all the CSS classes that SAPUI5 components use.

former_member184594
Active Contributor
0 Kudos

Thanks a lot for your help.

Answers (1)

Answers (1)

Former Member
0 Kudos

Have you checked this post?