Forums
Forums / Plugin: Font Awesome 4 Menus / Wrap icon like text
(@saas)
12 years, 2 months ago
Hi, Thanks for such a useful plugin.
I was working on project where I felt I should apply some styles to icon and I felt like wrapping it inside span like you have for text is good way to achieve it, so it will be good if you wrap the icon like
if ($before) { $newtext = '<span class="fontawesome-icon"><i class="' . implode(' ', $fontawesome_classes) . '"></i></span><span class="fontawesome-text"> ' . $text . '</span>'; } else { $newtext = '<span class="fontawesome-text">' . $text . ' </span><span class="fontawesome-icon"><i class="' . implode(' ', $fontawesome_classes) . '"></i></span>'; }
won’t hurt and will also allow people like me to use it they way we want.
Thanks, Syed
https://ww.wp.xz.cn/plugins/font-awesome-4-menus/
(@new-nine)
12 years, 1 month ago
You can apply styles directly to the i class. For example, you could use
.current-menu-item .fa-home {color: #000;}
To make the home icon black for the current nav menu item.
12 years ago
I’m marking this as resolved. Let us know if you have any other problems!
The topic ‘Wrap icon like text’ is closed to new replies.