1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Center Node Icons

Discussion in 'Styling and Customization Questions' started by albnaldo, May 12, 2015.

  1. albnaldo

    albnaldo Member

    Hello,

    I have enabled custom node icons on my forum using this CSS on EXTRA.CSS file:

    .node .node_6 .forumNodeInfo .nodeIcon, .node .node_6 .categoryForumNodeInfo .nodeIcon {
    background-image: url("@imagePath/xenforo/widgets/image.png");
    }
    .node .node_6 .forumNodeInfo.unread .nodeIcon, .node .node_6 .categoryForumNodeInfo.unread .nodeIcon {
    background-image: url("@imagePath/xenforo/widgets/image.png");
    }

    However, I have set node image sizes to 50 px by 50 px whereas images assigned are 100 px by 100 px. The problem is that the images look cropped out. How to make the images smaller without having to resize them (reuploading)? I am using a theme made by Audentio (Mike Creuzer) and they keep insisting for me to pay $99 if they want to help. Could you help me?

    What code should I add for a single node icon to resize it and make it smaller?

    http://i.imgur.com/2s5Yiet.png
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Why don't you just upload images which are the correct size, rather than resizing them?
     
  3. albnaldo

    albnaldo Member

    Hi,

    There are more than 100 images that have to be resized. It would take a long time.
     
  4. rafass

    rafass Well-Known Member

    Try with:
    Code:
      background-size: contain;
    3.gif
     
    albnaldo likes this.
  5. albnaldo

    albnaldo Member

    Awesome!
    That did the trick. Simply had to add the code to each line of custom node icon on EXTRA.CSS file :D
     
    rafass likes this.

Share This Page