Replace Text With An Image Using CSS

This technique works by pushing the text down inside the header with a rather large line-height (it must be at least twice the height). Then the overflow: hidden hides the text since it’s overflowing. Source

<style type="text/css">
  .ccbnRequired
        {         
            
             width: 13px;
            height: 15px;   
               
            background-image:url("/images/skins/white/forms/form_required.gif");
            background-repeat:no-repeat;

            overflow: hidden;
            line-height: 500px;                  
           
        }
</style>
Advertisements