Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • kunjan
    Participant

    Style links depending on file format

    /* external links */
    a[href^=”http://”%5D{
    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;
    }

    #111412
    Paulie_D
    Member

    @kunjan

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

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