Published in: CSS
URL: http://pooliestudios.com/projects/iconize/
Style external links.
Inspired by: http://pooliestudios.com/projects/iconize/ and http://www.hunlock.com/blogs/Attach_icons_to_anything_with_CSS
// External links a[href^="http:"] { display:inline-block; padding-right:14px; background:transparent url(/images/external.png) center right no-repeat; } // Comunication: Email, IM, VOIP... a[href^="mailto:"], a[href*="@"] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/email.png) center left no-repeat; } a[href ^="aim:"] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/aim.png) center left no-repeat; } a[href ^="msnim:"] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/msn.png) center left no-repeat; } a[href ^="xmpp:"] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/jabber.png) center left no-repeat; } a[href *="icq.com"] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/icq.png) center left no-repeat; } a[href *="edit.yahoo.com/config/send_webmesg?"] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/yahoo.png) center left no-repeat; } a[href ^="callto:"] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/call.png) center left no-repeat; } a[href ^="skype:"] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/skype.png) center left no-repeat; } // Blogging a[href*="trackback"] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/link.png) center right no-repeat; } a[href*="postcomment"], a[href*="respond"] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/comment.png) center right no-repeat; } a[href*="action=edit"] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/page_white_edit.png) center left no-repeat; } // RSS Feeds a[href*="rss2"], a[href*="feed"], a[href$='.rss'], a[href$='.atom'] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/rss.png) center right no-repeat; } a[href$='.opml'] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/opml.png) center right no-repeat; } // Office documents a[href$='.xls'], a[href$='.csv'], a[href$='.xlt'], a[href$='.xlw'], a[href$='.xlsx'], a[href$='.ods'] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/page_white_excel.png) center left no-repeat; } a[href$='.ppt'], a[href$='.pps'] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/PowerPointIcon.gif) center left no-repeat; } a[href$='.doc'], a[href$='.rtf'], a[href$='.txt'], a[href$='.wps'], a[href$='.odt'], a[href$='.docx'] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/page_white_word.png) center left no-repeat; } // Text a[href$='.txt'] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/page_white_text.png) center left no-repeat; } a[href$='.pdf'] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/page_white_acrobat.png) center left no-repeat; } // Compressed files a[href$='.zip'], a[href$='.gzip'], a[href$='.rar'], a[href$='.ace'], a[href$='.tar.gz'], a[href$='.tgz'] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/page_white_compressed.png) center left no-repeat; } // Audio a[href$='.mp3'], a[href$='.aiff'], a[href$='.wav'], a[href$='.ogg'], a[href$='.wma'], a[href$='.flac'], a[href$='.m4a'] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/music.png) center left no-repeat; } // Video a[href$='.mpg'], a[href$='.mpeg'], a[href$='.avi'], a[href$='.mv2'], a[href$='.mov'], a[href$='.mp4'], a[href$='.wmv'] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/film.png) center left no-repeat; } // Photo a[href$='.jpg'], a[href$='.gif'], a[href$='.png'], a[href$='.bmp'], a[href$='.jpeg'], a[href$='.svg'], a[href$='.eps'] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/photo.png) center left no-repeat; } // Flash a[href$='.swf'], a[href$='.fla'], a[href$='.swd'] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/page_white_flash.png) center left no-repeat; } // Apps: Exe, dmg, apps, xpi... a[href$='.exe'] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/exe_file.png) center left no-repeat; } a[href$='.dmg'], a[href$='.app'] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/dmg_file.png) center left no-repeat; } a[href$='.xpi'] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/xpi_file.png) center left no-repeat; } // vCard a[href$='.vcard'] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/vcard.png) center left no-repeat; } // iCal a[href$='.ical'] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/ical.png) center left no-repeat; } // TTF a[href$='.ttf'] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/ttf.png) center left no-repeat; } // CSS a[href$='.css'] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/css.png) center left no-repeat; } // Web 2 . 0 a[href *="youtube.com/watch?"], a[href *="sevenload.com/videos/"], a[href *="metacafe.com/watch/"] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/film.png) center left no-repeat; } a[href *="flickr.com/photos/"], a[href *="zooomr.com"], a[href *="imageshack.us"], a[href *="bubbleshare.com"], a[href *="sevenload.com/bilder/"] { display:inline-block; padding-left:20px; line-height:18px; background:transparent url(/images/photo.png) center left no-repeat; } /* making sure images don't get icons */ .imageLink { padding-right: 0px !important; background: none !important; }
You need to login to post a comment.
