Skip to Content
0
Jun 27, 2015 at 06:02 AM

SAP UI5 button CSS properties for displaying text in it

1778 Views

Hi Everyone,

I'm developing a button with text in it. Text is chosen dynamically using globalization. So size of the text will vary.

For eg now i have

<Button text="scan product" class="mybtn" ></Button>

output :

when text size and length is increased,

output :

in first case i want "scan product" to be displayed exactly in the middle of the button.

and in second case how can i make my button to increase size automatically based on text length? Is it possible?

this is my css

.mybtn {

height:100px;

width:200px;

font-color:black;

word-wrap:break-word;

white-space: normal;

line-height: normal;

font-size:30px;

background-color:#DCDCDC;

font-weight:bold;

}

Thanks in advance

Attachments

Capture.PNG (4.4 kB)
Capture.PNG (9.6 kB)