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

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

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

google shop client API returns 400 bad request error while adding an item -