cancel
Showing results for 
Search instead for 
Did you mean: 

CSS for SAPUI5 controls

Former Member
0 Kudos

Hi Experts,

I tried to apply CSS to the SAP UI5  button control as below.

In the CSS file:

.myButton

{

              color: red !important;

  font-size: 14px;

              background-color: Grey;

}

in the Java script:

Button4_c2c5.addStyleClass("myButton");

But the CSS didn't applied.

Can any one tell how to apply CSS to SAPUI5 controls?

Regards,

Naga.

Accepted Solutions (0)

Answers (3)

Answers (3)

agentry_src
Active Contributor
0 Kudos

Discussion successfully moved from SAP Manufacturing Integration and Intelligence (SAP MII) to SAPUI5 Developer Center

as the more appropriate community for this topic (as Christian noted).

Cheers, Mike (Moderator)

SAP Technology RIG

former_member185280
Active Contributor
0 Kudos

Naga,
Are you aware of the UI5 forum on the scn? I think a lot of your questions might be better addressed there. There are also links to a lot of resources to help advance your UI5 skills.

Regards,
Christian (moderator)

saivellanki
Active Contributor
0 Kudos

Hi Naga,

You are applying it on Button (Parent) element where you can mainly adjust button width and height but not color / bg-color etc., instead you have to apply it on button inner element.


Will this sample help? JS Bin - Collaborative JavaScript Debugging

Regards,

Sai Vellanki.