Adding icons next to hyperlinks helps your readers to detect the file format easily.You can add this icons very simply and easily with using css.If your link is pointing to a mp3 file then it will add a music symbol next to the link and so on.This amazing trick was bloggerized by Mohammad Sir Of MBT,So I gave all credits to MBT Blog.
How To Add These Icons To Your Hyperlinks?
- Go To Blogger > Design> Edit HTML
- Download your template.
- Search for this,
]]></b:skin>
- Just above it paste the code given below,
a[href*='.js'] {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqSzBC3fdAd3sCGBB5XOFTqn0UKAih-WwfarNW0qmyuh14sXltzqgvmZNR7qmGzqrQKU4pP9e9Kr0TnY4w2_NSQhsJgcaq8VHuSS-ZAl_dGj11xRCEYQvdY_mSLRwKjYRBtxh8qkOvAFo/s400/file_js.png) no-repeat 0 0;
padding:7px 0 0 25px;
}
a[href*='.gif'] {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKPCrxme2PXvuTGSWdDU9XQolsVN1Zjaxpfw5w2_o_tTjF2r4WauOM-GEF27k7pYM9uEvxYox0MRlAD5v8wt2cnJluaLJAZica30jy3jZCVanR2XvGKfRkq6QTXDR2IcC4eBT5o_bhVi8/s400/file_gif.png) no-repeat 0 0;
padding:7px 0 0 25px;
}
a[href*='.doc'] {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk2t0GBIrmI5NKFkIfBPPdDSUi8a5dkYMbJ9Ax5x1R3lagkCTEsza7YMHp66Zq2JljRx_s7TRkqUa7WsZrnPWLIog5Vo6J9v_m0zLzTBmIj9JH3Iyaj0jObm3AxfqxAZgA00D-cWJrZTE/s400/file_doc.png) no-repeat 0px 0px;
padding:7px 0 0 25px;
}
a[href*='.rar'] {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT2ClQZ2b8bhvMbtX42IkQEEjZM3iZeluMaTnpKNxHl_qlS2bWMMY7jOFpaidbiudH5lBQuAt69dJADn3joktLC-_yYuxSphwba35sW6KNFqt4AhfAsAxe665Y5yWLJu-mMvEahE3MjW8/s400/file_rar.png) no-repeat 0px 0px;padding:7px 0 0 25px;
}
a[href*='.zip'] {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifWirPwlsN_X6jLq3DHAOCD3HRAQIdjNiVX4pJ0Ah7ZA4EPJcBrlKCaX-CFGiomjk7uZvQaMzokIPDNMDgaR3gL5UiCZQEEoJWuptm6c5TuyCxWlRA9RLsY4nbqQznhNjMToa2P3t84vc/s400/file_zip.png) no-repeat 0px 0px;
padding:7px 0 0 25px;
}
a[href*='.mp4'] {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOBpaGuO16ZQOzr6YryHq_tEvFEXZ1y-dM8SUrzyuJE5SZTi4aqqfnCbg9mE9tPciiTG-vieYpvZLY8Ss_qY87sLXF2scLcC3h0XA81kFDEKPB8XEtMFFqsUeO7fjpwHmtMVXHcqoERXs/s400/file_mp4.png) no-repeat 0px 0px;
padding:7px 0 0 25px;
}
a[href*='.php'] {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3xvVhTRLYJVrPdwc0IW3eU01SSjDwh_PKUrGKajG9UHqDZo0hwCRrXkA9My2YeC155ULkI6YzY2pjysdizRJtcmc0t3XDBTiqDwNlPcVal9OfcuNwQjWhidpMnK8SbBnPHCFVDwhBCD8/s400/file_php.png) no-repeat 0px 0px;
padding:7px 0 0 25px;
}
a[href*='.xml'] {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI0EcMjDjDU30rDed0VfZ5vPdjqhnCpo_7trmdkx1X45pKaL5SOI3x01Vv-SQLkKCOwusCu2g9E5DsIggIJ5rhQpDiVXTVOx-CQdzNqLuJs73ytag90aoBPbaAJy_kIJkcYTD_esI41co/s400/file_xml.png) no-repeat 0px 0px;
padding:7px 0 0 25px;
}
a[href*='.pdf'] {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqJt2dklc7JTAWDTGIDiG-A29h5rd95_X3C-9pIAAycC7v0NItWEv67dAXhwa5TnMNT-htzhhWPlJCNin2gj7Lskbsj5QCsA15WT4getulj3yiF32d-KQNX3CB75_sCF0UmdJE0HivJAc/s400/file_pdf.png) no-repeat 0px 0px;
padding:7px 0 0 25px;
}
a[href*='.xls'] {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrxskBfalZCtQ5QF6AOQDxctplFEK10pqeMKqRPzhjBmrLsXe3_d4fUou8gSSSvTH1ksARogSd2SrTYPuwUy7ZJJcwMpK_rpIioTMFJHVxL7GHIthpLkLDn7prKM9_Gk2E2sMAIeoMrC4/s400/file_xls.png) no-repeat 0px 0px;
padding:7px 0 0 25px;
}
a[href*='.mpg'] {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr7opvj0G8Uuji26PG5SrfUyj113Cg32lH1ATQqlGtjZs7xahtFEsVELFV0sVURe6R3JjDHoggT1lZmeaE8A3_pXyd2dGFrMT0OE4U6uSw-jJjMZ0sGIIFt43m6f3LUqcwe4Mu0WnMDeM/s400/file_mpg.png) no-repeat 0px 0px;
padding:7px 0 0 25px;
}
a[href*='.bmp'] {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcD1pceXJb7y1FShyEEQKLOcskz9n4o0ua-fnpK8Rkry4Y7-V772xVDE2V5YRFCY4ty9QRW0yIDBuJkgn6FdJaDTpG9Ms5qXQgMQtpbTmW3SxgqvpobLl67u5oV9w7BX_0SI0oX50VpWM/s400/file_bmp.png) no-repeat 0px 0px;
padding:7px 0 0 25px;
}
a[href*='.avi'] {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2tx8pd1yYQyVEBFN6LSQnpSn8lLeN-c09idk62ZQICW54ZQNQWqnczGrMfqsm9MgvloWWSZTYqrCMYssss18TEqk7gJ3SZP7wpaT2jB8MB46qsrrvNSYRR9OFLzf4gdnoitTFkeOruZQ/s400/file_avi.png) no-repeat 0px 0px;
padding:7px 0 0 25px;
}
a[href*='.mp3'] {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUG4pSefF23biNeps7Up-EssFRziOpUEV7njiBhDjxt9nRdepjCfna1iJhbfjFSMwJ6z8gjxySUoRc1138XFP1PW24Ui8WteH5FDipb2UaojcrX70vd8s4KlOt1V3cKLNdqvGPJobweug/s400/audio_alt.png) no-repeat 0px 0px;
padding:7px 0 0 25px;
}
a[href*='mailto'] {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqkW4aJ6g9ANVIPBpotOnMmUi5bURkZR2o05Ks7_nBQIuTcc-PDsDFWD8W7vfQkFVlWETKFC6NkYgwGjaKXCgo2Gx-I5lJrJvPJlcgAPsK0ZC4x36OQUhYB83DwBM-_hwMbJj9fqhHWNc/s400/e_mail.png) no-repeat 0px 0px;
padding:0 0 0 25px;
}
You can also use icons of your choice by simply changing the icon image links in the code above. The code is really easy to edit and I hope after having read so much of our tutorials you can at least edit this code. Have fun and let me know if you faced any problem. Enjoy! :)
No comments:
Post a Comment
If you want to be informed about any replies then check "Notify me" option (present at lower right corner of comment box and it will display if you are logged in to your google account). PLEASE DO NOT SPAM