Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

SAP UI5 button CSS properties for displaying text in it

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

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question