Trying to Use CSS to Insert PNG Icons in Tag Boxes
DogeRTX is trying to insert PNG icons into specific tag boxes using CSS. They have successfully targeted all tag boxes but need help selecting individual tags.
DogeRTX provided their current CSS code for selecting all tags and a specific tag.
Codinghorror suggested using SVG glyphs instead of PNGs, citing a relevant component on Meta Discourse. However, DogeRTX mentioned that converting 400+ PNG icons to SVG would be challenging and may compromise image quality.
Steven proposed using a CSS attribute selector to target specific tags. He provided an example using [href*="question"] and recommended exploring alternative attribute selectors for more complex cases.
DogeRTX expressed gratitude and optimism that Steven’s solution will work for their needs.
Hello, I am trying to use a set of png icons for icons on my forum on the tags. iv got it to fit in the tag box how it looks nice but that’s for every tags box, iv found how to target specific tags but what would be the right way of selecting that specific tag box to put in the png icon? Any help would be awesome!
I was already trying that but with what I am trying to do I would need to try and convert like 400+ png icons to svg and then make all of that an svg sprite and from what iv tried and read there isn’t a fast or good way of converting them and keeping the quality of the original png. I did try with one icon a few times but the quality would usually go down and then when I put it into a sprite I couldn’t get it to load with the theme component.