javascript - CSS cutting text and numbers -


i have large text "desoxyribonucleic" , number 0.4234 or 0.352352523

so need such format of represent it:

text: desoxyribon... number: 0.42 number: 0.35

is real roll out css? thanx!

yup!

.ellipsis {     max-width: 100px; /* adjust needed */     white-space: nowrap;     overflow: hidden;     text-overflow: ellipsis; /* magic happens here */ } 

for numbers, can try using somenumber.tofixed(2) in javascript, careful of rounding.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -