XF 2.1 Problem with a Navtab Icon

vangelis

Member
Hello,

i have added a forum icon to the navtab in my forum.

Everything works great except the one:
2222.webp


I use this code:


CSS:
.p-navEl a[data-nav-id='windows']:before {.m-faContent("@{fa-var-windows}");}

and
CSS:
.p-navEl a[data-nav-id='windows']:before {content:"\f17a";}

3.webp

unfortunately you will not be shown one
Anybody got any ideas?



Thanks a lot
 
Hello and thank you for your answer.

unfortunately this does not work

I put that in the extra.less:

CSS:
.p-navEl a[data-nav-id='windows']:before {.m-faContent("@{fab-var-windows}");}

but is not displayed.

am I doing something wrong?

here again my extra.less:

Code:
.p-navEl a:before {
    .m-faBase();
    display: inline-block;
    text-align: center;
    margin-right:2px;
    border-radius:25px;
    line-height:normal;
}

.p-navEl a[data-nav-id='Home']:before {.m-faContent("@{fa-var-home}");}

.p-navEl a[data-nav-id='windows']:before {.m-faContent("@{fa-var-windows}");}
}

danke
 
I don't know if this will work but that is a navigation link so worth a try...

AdminCP >> Setup >> Navigation >> Public navigation

Delete or comment out the extra CSS you added and use this instead.

Add this before the link for that item:

<i class="fab fa-windows"></i>
 
Code:
.p-navEl a[data-nav-id='windows']:before {
    margin-right:2px;
    .m-faBase('Brands');
    .m-faContent("@{fa-var-windows}");
}

This should work
 
Top Bottom