This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Add Font Awesome Icon to Link Menu Item on Mobile Layout

Resolved 3 replies premiumthemetheme-vantage
11 years ago · Last reply by Andrew Misplon 11 years ago

I added the custom CSS code, given in another thread, that adds a Font Awesome icon to Link menu items. While this works perfectly on desktop browsers, mobile browsers (or anything that collapses the responsive theme to a mobile layout) do not show the icon in the menu. Any suggestions?

.main-navigation div > ul > li.menu-item-110 > a:before {
	content: "f0f2";
	color: #CCCCCC;
	display: inline-block;
	font-family: FontAwesome;
	font-size: 16px;
	line-height: 0.5em;
	margin-right: 15px;    
}

URL: https://www.winterhearth.org

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

3
  1. Andrew Misplon Staff 11 years, 4 months ago

    Hi Jeffrey

    I wrote that before I realised there was this awesome plugin out there:

    https://wordpress.org/plugins/menu-icons/

    I just tested it with our mobile menu and it works perfectly. Once installed head to Appearance > Menus, each item in the menu will have the option to add an icon.

    Hopefully you’re happy going this direction, I think it works really well.

  2. Jeffrey 11 years, 4 months ago

    Andrew,

    Thanks, I got this working successfully. For anyone else reading this, you can use a console in a browser to examine the CSS hierarchy of the added icons and then add right-margins (15px) to get them to look similar to the way that Vantage does it.

  3. Andrew Misplon Staff 11 years, 4 months ago

    Super, glad that helped. Thanks for adding that little bit on padding/margin. All the best.

    (For anyone wanting a quick overview on Custom CSS and your browser’s developer tool, here is our tutorial:
    https://siteorigin.com/basics/modifying-theme-design-with-custom-css/)

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread