...

View Full Version : adding file types to links css



pagedrop
10-24-2011, 02:06 AM
hello,

i found the following css to show icons based on the file types or if the <a> tag has http..


a[href$='.zip'], a[href$='.rar'], a[href$='.gzip'] {
background:transparent url(../images/zip.png) center left no-repeat;
display:inline-block;
padding-left:20px;
line-height:18px;
}

or for http

a[href^="http://"] {
background:transparent url(../images/external.png) center right no-repeat;
display:inline-block;
padding-right:15px;
}

Now, most of my <li> lists have more than single <a> but i only want to show the above mentioned icons, if href^="readfile.php?" and href$=pdf...

so basically need help combining the above two together.
thank you

pagedrop
10-24-2011, 03:19 AM
nevermind, i got it.

added id value and used


a[id $='.doc'] {
background:transparent url(img/word.png) center left no-repeat;
display:inline-block;
padding-left:20px;
line-height:15px;
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum