Over a million developers have joined DZone.

Accessibly Replacing Text With Images

DZone's Guide to

Accessibly Replacing Text With Images

· ·
Free Resource
// There are quite a few methods to do this but here's one I used recently. It replaces the word "Correct" at the end of a sentence with a graphic tick.


This part of the text is displayed Correct

CSS span.correct {background:url(tick.gif); margin-left:0.5em; text-indent:21px; position:absolute; overflow:hidden; width:20px; height:19px}

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}