Oct 16, 2008
Neat lil' css trick
a[href$=".pdf"]::after {
content: " (pdf)";
}
PDFs tend to be large and unwieldy, and they like crashing browsers. Many people like to be warned that a pdf is lurking behind some innocent link. Here’s one little trick that appends a warning to every link that ends inĀ .pdf, via CSS. Spotted here.
If your readers are using a decent browser, it’ll even work!
About
Daily Meh is written and edited by Simen (contact me). I live in Norway. This blog is about whatever interests me. Here are some of my favorite posts from the archives.
You can subscribe via RSS.