XF 1.2 Custom node icons not working

Followed instructions for replacing node icons but all I end up with are a couple of pixels and a blank space. Using this in my extra.css

/* custom status icons */
.node .node_25 .forumNodeInfo .nodeIcon, .node .node_25 .categoryForumNodeInfo .nodeIcon {
background-image: url("http://onlinetradersforum.com/styles/default/xenforo/widgets/forumreadbull.jpg");
}
.node .node_25 .forumNodeInfo.unread .nodeIcon, .node .node_25 .categoryForumNodeInfo.unread .nodeIcon {
background-image: url("http://onlinetradersforum.com/styles/default/xenforo/widgets/forumunreadbull.jpg");
}
 
Instead of using the http:// format, use an absolute path. I personally install all my custom icons in a directory called /images (off the web root) and then subdirectories off of there. In the case of the node icons it is /images/nodes so the call to a file would be
Code:
background-image: url("images/nodes/archlinux.png");
 
You have background-position: -36px 0; specified.
Remove that as you're not using a sprite.
Or rather, add background-position: 0 0; to your CSS.
 
Good catch @Brogan.... I hadn't gone to his site to check it out.
@Thierry Martin, here is a snippet of mine (I use the same icon for both read/unread and just apply an opacity).

Code:
.node.node_2 .forumNodeInfo .nodeIcon, .node.node_2 .categoryForumNodeInfo .nodeIcon {
    background-image: url("images/nodes/archlinux.png");
    background-position: 0px 0px;
    opacity: 0.4;
}
.node.node_2 .forumNodeInfo.unread .nodeIcon, .node.node_2 .categoryForumNodeInfo.unread .nodeIcon {
    background-image: url("images/nodes/archlinux.png");
    background-position: 0px 0px;
    opacity: 1.0;
}
 
OK the icons for forums work great but now I have a category which displays the custom icon correctly however I can't get custom icons working for the category's subforums using the same code in extra css that I used for forums. I have searched here and only found old posts with the same problem unanswered. How to show custom icons for subforums?
 
Last edited:
OK the icons for forums work great but now I have a category which displays the custom icon correctly however I can't get custom icons working for the category's subforums using the same code in extra css that I used for forums. I have searched here and only found old posts with the same problem unanswered. How to show custom icons for subforums?
The code I provided should work just fine as long as you use the correct node ID.
screenshot.webp screenshot1.webp
 
Top Bottom