Quantcast
Channel: Unicode character for "X" cancel / close? - Stack Overflow
Viewing all articles
Browse latest Browse all 38

Answer by Richard JP Le Guen for Unicode character for "X" cancel / close?

$
0
0

Forget about a font and use a background image!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><title>Select :after pseudo class/element</title><style type="text/css">            .close {                background:url(http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/images/ui-icons_222222_256x240.png) NO-REPEAT -96px -128px;                text-indent:-10000px;                width:20px;                height:20px;            }</style></head><body><input type="button" class="close" value="Close" /><button class="close">Close</button></body></html>

This will be more accessible for users visiting the page with a screen reader.


Viewing all articles
Browse latest Browse all 38

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>