Matt Gray

A touch of CSS

Jul 23, 2005

If you aren’t using Mozilla’s Firefox, 1) you should be and 2) check out Google’s sweet hybrid interface to its satellite imagery/maps browser instead.

It is true, you can learn something from reading Slashdot. Hate clicking on a link only to discover it is a PDF? Despair no more. Simply edit (or create) userContent.css in your chrome/ directory. For Linux peeps, that would be in your ~/.mozilla/firefox/default.*/chrome/ directory.

Add the following:

a[href$=".pdf"]:after {
    font-size: smaller;
    text-decoration: none;
    font-style: normal;
    font-weight: normal;
    content: " [pdf]";
}

Adjust to taste. Restart your browser, and now PDF-based links will have a little [pdf] after them!

CSS rocks. This tip was culled from cortana’s slashdot comment. There’s some signal in the comments thread after all.

← Previous Post Next Post →