Icon Font in Menu Item

More
11 years 5 months ago #15764 by Bucklash
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.

More
11 years 5 months ago - 11 years 5 months ago #15766 by Bucklash
Replied by Bucklash on topic Icon Font in Menu Item
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: 11 years 5 months ago by Bucklash. Reason: Spelling

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

More
11 years 5 months ago #15768 by ced1870
Replied by ced1870 on topic Icon Font in Menu Item
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
The following user(s) said Thank You: Bucklash

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

More
11 years 5 months ago #15772 by Bucklash
Replied by Bucklash on topic Icon Font in Menu Item
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.

More
11 years 5 months ago #15773 by ced1870
Replied by ced1870 on topic Icon Font in Menu Item
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
The following user(s) said Thank You: Bucklash

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

Time to create page: 0.215 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 748 guests and no members online