cancel
Showing results for 
Search instead for 
Did you mean: 

Applying CSS over sap.m Controls

Former Member
0 Kudos


Hi Experts,

I want to know how we can modify the width,height of various sap.m Controls for which we don't have properties to set.

For Example: sap.m.Combobox, sap.m.Input ,etc.

I want a full fledged example to study how to use CSS over sapui5 library controls  it.

Thank You in advance.

Regards,

Dhiraj More

Accepted Solutions (0)

Answers (2)

Answers (2)

pinakipatra
Contributor
0 Kudos

Hi , simple way is to find the div element of the ui5 control and changing the css properties of that div.

Div element can be seen by pressing Ctrl+Shift+c and clicking on the control.

This will show the div prop .

Change the div css

place the div in the index style tag of the index page

Here i am applying with class . . hence it will apply to all the sap.m.Input controls. .
If you want to specifically change the css of a control give the control an id and apply css using that id. .
#idControl{

     height : 120px;

     width : 300px;

}

Former Member
0 Kudos

Hi,

Here you go...

1 remark: I'd use a stylesheet

Kind regards,

RW