JOAOSANTACRUZ.COM

Style your links depending on file format

This css code lets you specify the icon for your links depending on the file format.


						
    /* external links */
    a[href^="http://"]{
        padding-right: 20px;
        background: url(external.gif) no-repeat center right;
    }
 
    /* emails with mailto */
    a[href^="mailto:"]{
        padding-right: 20px;
        background: url(email.png) no-repeat center right;
    }
 
    /* mp3 files */
    a[href$=".mp3"]{
        padding-right: 20px;
        background: url(mp3.png) no-repeat center right;
    }
Go Back