hello i am trying to make span that allows me to trim too long words in the middle:
but the problem is if the word is long the letters are being cut in the middle:
and if the word is short it appears twice:
css:
#attachmentfile span {
white-space: nowrap;
overflow: hidden;
display: inline-block;
}
#attachmentfile span:first-child {
width: 50%;
text-overflow: ellipsis;
}
#attachmentfile span + span {
width: 50%;
direction: rtl;
text-align: right;
}
html:
<span>
{{Att}}
</span>
<span>
{{Att}}
</span>
sample: http://jsfiddle.net/c8everqm/1/