Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to short button value ? – CSS

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.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

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;
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading