html - Hide first x characters -


is possible hide first x character of h4 element via css?

for example:

<h4>data: random data.</h4> 

"data: " shall not shown.

i tried overflow , moving div contains h4, works, isn't solution me.

maybe there's command don't know helps. know javascript , strreplace work well, i'm looking pure css solution.

sadly, css can't calculate width of strings , has no access textual content... if using monospace fonts, you'd able calculate width manually, based on font size, still bad solution.

negative margins, indents, etc. unreliable have no idea how fonts rendered, meaning break , ugly in different browsers, under different zoom levels, etc...

bottom line: css alone can't it


Popular posts from this blog