Solved: 5 Years, 3 Months, 2 Weeks ago How to attach forum icons into a spritesheet?
#1
Solved: 5 Years, 3 Months, 2 Weeks ago
Hello,
         I recently added forum icons to my site, so that I may have an image for each forum. However, I know that this may slow down the performance, so I would like to attach them all into a css spritesheet. Only problem is, I'm not entirely sure how to go about doing it. This is the code I used for the forum icons: 
<td class="{$bgcolor}" align="center" valign="top" width="1"><img src="images/ficons/{$forum['fid']}.gif" alt="" title="" class="" id="" height="40" width="40" /></td> 

Here, it calls for an image with the forum's id, however I do not know how to modify it to look at a single spritesheet image, and where to even put the css for the spritesheet. I appreciate all help, thank you in advance.

My site: 
mathforums.net          (some forum icons are missing because I have not put them in yet)
Reply
#2
Solved: 5 Years, 3 Months, 2 Weeks ago
I figured it out, I just replaced the code in my original post with:
<td class="ficon_{$forum['fid']}" title="ficon_{$forum['fid']}" width="40px" height="40px"> </td> 
Then, I added its css in the globalcss, and tweaked it to my liking.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)