How to Add a Specific File Icon to my File Directory Script

A few request have come in for specific icons in my Free File Directory List Script. So here is a quick two step tutorial on how to add you custom file extension icon to your list.

1. Google for or create a 50 pixel tall by 50 pixel wide icon for your file type. Transparent PNG would be ideal, but really anything with a white background will look good. For instance here is a .apk icon example. (Tip: upload your icon to dropbox for quick and free CDN storage)

2. Add the following line of CSS to the index.php script in the <style> </style> section at the top of the page.

.media_block_image a.apk { background: transparent url( no-repeat 0 0; }
  • Change the ‘a.apk’ to the file extension you need. For example for MP3 it would be ‘a.mp3’ and for a HAL file it would be ‘a.hal’
  • Inside of the ‘transparent url(YOUR URL HERE)’ part, add the url to your file. This is basic CSS, if you need help with this please Google ‘CSS Background Image’

Thanks for using the script and making directory list pages more beautiful one directory at a time.