Icon Font in Menu Item

Icon Font in Menu Item was created by Bucklash

Posted 10 years 5 months ago #15764
Bon Soir Mr CK

I apologise if this has been mentioned before but I can't find it:

I would like to put an icon font in to some of my menu items ie:
<li><a><i class="icon-star"> </i>Favourites</a></li>

I don't expect maximenu to do everything, it almost does!!

But this capability would be the icing on the cake if it were possible.

i am trying to find a solution but thought I would ask you aswell.

(It would be great if we could enter html in module titles, but alas, we can't)

Merci / Thanks

Jon

Please Log in or Create an account to join the conversation.

Replied by Bucklash on topic Icon Font in Menu Item

Posted 10 years 5 months ago #15766
Right,

I was being a bit of a dumbo, or I'm now being really clever (you decide)

I thought icon-fonts HAD to be in an <i> tag.

I just added the class to the <li> and all is funky ( I added css to change the icon from width 14px to auto to suit my visual idea)

I assume I am not breaking any coding law that says I MUST use an <i> tag...

I will use it until the HTML police come a knockin'

Jon
Last Edit:10 years 5 months ago by Bucklash
Last edit: 10 years 5 months ago by Bucklash. Reason: Spelling

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic Icon Font in Menu Item

Posted 10 years 5 months ago #15768
Hi
you can do that like this, no problem :)
you can use the bootstrap css class for icon on every html tag
CEd

Joomlack Webmaster and Developer

by ced1870
The following user(s) said Thank You: Bucklash

Please Log in or Create an account to join the conversation.

Replied by Bucklash on topic Icon Font in Menu Item

Posted 10 years 5 months ago #15772
Good to know

Why do all the examples use the <i> tag

I suppose it must be a best practise principle?

Anyway, thanks for confirming it was ok to do

Jon

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic Icon Font in Menu Item

Posted 10 years 5 months ago #15773
really ? I don't know, may be because "i" is a simple html tag and because written "i" is less characters than "span" for example :D

Joomlack Webmaster and Developer

by ced1870
The following user(s) said Thank You: Bucklash

Please Log in or Create an account to join the conversation.

Time to create page: 0.644 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 742 guests and one member online