I did like so when a href's extension is .pdf; .doc; .ppt; .xls then it'll add corresponding file picture in front of it. Then I tried making a link go smaller when I hover over it but I doesn't do anything! Am I doing something wrong or what?
Code:
ul{
list-style-type: none;
}
ul a{
text-decoration:none;
padding-left: 20px;
background-repeat: no-repeat;
}
ul a:hover{
text-decoration:underline;
color:#666;
-moz-transform: scale(0.9);
-webkit-transform: scale(0.9);
-ms-transform: scale(0.9);
transform: scale(0.9);
}
a[href$=".pdf"]{
background-image:url(https://i.sstatic.net/zJlYq.gif);
}
a[href$=".doc"]{
background-image:url(https://i.sstatic.net/z2lbW.gif);
}
a[href$=".ppt"]{
background-image:url(https://i.sstatic.net/Tk5Vv.gif);
}
a[href$=".xls"]{
background-image:url(https://i.sstatic.net/sOr7E.gif);
}
<ul>
<li><a href="/one.pdf">pdf</a></li>
<li><a href="/two.doc">doc</a></li>
<li><a href="/three.ppt">ppt</a></li>
<li><a href="/four.xls">xls</a></li>
</ul>
