Is it possible to remove or simply hide the very last character in a string in pure css?
When I search for this all I find is javascript / jQuery solutions.
Thank you in advance.
Use CSS3 text-overflow
.
(More information about text-overflow
)
Live demo on jsfiddle
CSS:
#txt{
position:relative;
padding:7px;
text-align:justify;
background:#e7e7e7;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
Working in: (latest versions)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With