Home > Software design >  How to short button value ? - CSS
How to short button value ? - CSS

Time:02-17

I want to short button value using CSS. enter image description here

Final out put need to like this.. enter image description here

I need help. Thankyou.

CodePudding user response:

Wrap the button text in a , which has property to control text overflow and linebreaks.

Have a look at this jsfiddle: http://jsfiddle.net/5hEPZ/

<button><span class=buttontext>Very long text Very long text Very long text</span></button>

And then the css:

.buttontext {
width: 95px;
overflow: hidden;
white-space: nowrap;
display: block;
text-overflow: ellipsis;
}
  • Related