Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The following is based on this article (<a href="http://www.filamentgroup.com/lab/update_styling_the_button_element_with_css_sliding_doors_now_with_image_spr/" rel="nofollow noreferrer">http://www.filamentgroup.com/lab/update_styling_the_button_element_with_css_sliding_doors_now_with_image_spr/</a>), but adapted for use with the a tag.</p> <p>It is similar to @xijo 's answer, with a couple of minor tweaks.</p> <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd" &gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Test&lt;/title&gt; &lt;style type="text/css"&gt; /* REQUIRED BUTTON STYLES: */ a { border: 0; padding: 0; display:inline-block; } a span { display: block; white-space: nowrap; cursor: hand; } /* OPTIONAL BUTTON STYLES for applying custom look and feel: */ a.submitBtn { padding: 0 15px 0 0; margin-right:5px; font-size:2em; text-align: center; background: transparent url(btn_blue_sprite.gif) no-repeat right -140px; } a.submitBtn span { padding: 13px 0 0 15px; height:37px; background: transparent url(btn_blue_sprite.gif) no-repeat left top; color:#fff; } a.submitBtn:hover, button.submitBtnHover { /* the redundant class is used to apply the hover state with a script */ background-position: right -210px; } a.submitBtn:hover span, button.submitBtnHover span { background-position: 0 -70px; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; This is a bunch &lt;a href="#" class="submitBtn"&gt;&lt;span&gt;Submit&lt;/span&gt;&lt;/a&gt; of text. &lt;/body&gt; &lt;/html&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload