Say "Hello!"

  • This field is for validation purposes and should be left unchanged.

Style links depending on file format


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* external links */
    a[href^="http://"]{
        padding-right: 20px;
        background: url(external.gif) no-repeat center right;
    }

/* emails */
    a[href^="mailto:"]{
        padding-right: 20px;
        background: url(email.png) no-repeat center right;
    }

/* pdfs */
    a[href$=".pdf"]{
        padding-right: 20px;
        background: url(pdf.png) no-repeat center right;
    }

Back to Snippets Follow me on GitHub

Ashley Cameron logo
Blog