XF 2.0 Custom-Icon next to Node-Icon - 20 USD tip for help!

ses

Member
Hey there,

like here: https://www.android-hilfe.de/ - Category "Herstellerforen" I want to add a Custom-Icon next to the Node-Icon on the XF2 Style.

Is that possible by css only, or do I have to change a template?

I've changed the Node-Icon with this css-code:

//change node icon
.node-body {padding:4px;}
.node-icon i { display: none; }
.node-icon { background-image: url('/new_thread-blue.svg'); background-repeat: no-repeat; background-position: top 19px center; width: 36px; }
.node--read .node-icon { opacity: 0.2; }

Maybe one of you can help me to add a Icon next to the node-icon for certain nodes.

Best,
Sebastian
 
Last edited:

Finexes

Well-known member
That should be possible with CSS. Example:

CSS:
.node_*NODE_ID_HERE* .nodeIcon::before {
    background-image: url('https://example.com/example.png');
    background-repeat: no-repeat;
    content: ' ';
    width: 64px;
    height: 64px;
    float: left;
    margin-left: 30px;
    margin-top: -10px;
}

But you have to adjust the code to your needs.
 

ses

Member
Code:
.node--idXXX {
    background-image: url('.png');
    background-repeat: no-repeat;
    padding-left:80px;
}

This works, but than I have the Custom-Icon first and than the node icon.

Its the basic xenforo 2.0 style I work on.
 

Fethi.dz

Well-known member
CSS:
.node--idXXX .node-icon
{
    width: 120px;
}

.node--idXXX .node-icon i::after
{
    background-image: url('https://cdn1.android-hilfe.de/styles/uix/ah/csprite.png');
    background-repeat: no-repeat;
    display: inline-block;
    content: ' ';
    width: 64px;
    height: 45px;
    margin: -15px 0px 0px 8px;
}

192498
 
Top