Skip to content Skip to navigation

CSS to add .pdf, .doc, .ppt icons-indicators

Posted by: 
Topics: 

Long time ago I got this code from /* http://my-dimension.com/blog/category/xhtml-css/ */

a[href^="http://"]:not([href*="yoursite.stanford.edu"])::after {
content: "";
background: url(/images/external.png) center right no-repeat;
padding-right: 1em;
}

a[href^="mailto:"] {
background: transparent url('/images/mail_icon.gif') 100% 50% no-repeat;
padding-right: 18px;
}

a[href$=".doc"] {
background: transparent url(’/images/word_icon.gif’) 100% 50% no-repeat;
padding-right: 18px;
}

a[href$=".pdf"] {
background: transparent url(’/images/pdf_icon.gif’) 100% 50% no-repeat;
padding-right: 18px;
}

a[href$=".ppt"] {
background: transparent url(’/images/powerpoint_icon.gif’) 100% 50% no-repeat;
padding-right: 18px;
}

#bodyContent a.external,
#bodyContent a[href ^="https://"],
.link-https {
background: url(’/images/lock_icon.gif’) center right no-repeat;
padding-right: 16px;
}