Grow your CSS skills. Land your dream job.

For tag you can Style links depending on file format

  • # October 8, 2012 at 9:07 am

    Style links depending on file format

    /* 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;
    }

    # October 8, 2012 at 9:55 am

    @kunjan

    Thank you. If you have a snippet to submit, check here http://css-tricks.com/snippets/ first, as it may be already known.

Viewing 2 posts - 1 through 2 (of 2 total)

*May or may not contain any actual "CSS" or "Tricks".