I'm presenting some sensitive alphanumeric data (imagine a hash or checksum) of variable length, out of which only last four characters should be visible to user, rest is replaced with '#' characters. It's placed in a table column, whose width might change, when the user resizes the browser window. Since the data is sometimes too long for the column, i'm supposed to hide the initial '#', so that only the relevant part is visible and as many '#' in front required to fill the column.
Now, i've found a couple of suggestions to use the trick with setting the following:
text-overflow: ellipsis;
direction:rtl;
text-align:left;
white-space: nowrap;
overflow: hidden;
eg: https://stackoverflow.com/a/9793669
Well, this is the efect: http://jsfiddle.net/7qp8daj4/
Note, that for some reason the first string appears to start with the non-hash characters, followed by the hashes, while the second is presented correctly. By trial-and-error i managed to figure out that the "cause" is that the first string starts with a non-digit. If i replace the first line with eg <span>##########1YH35</span>
it is displayed correctly.
Any ideas as to the cause or how to fix it? Or do you know any other cool solution for this requirement?