Show image like "Brand" in menubar

Locked
typhon
Posts: 72
Joined: 28 Jul 2013, 14:22

05 Apr 2015, 12:26

Hello,

I'm running spark and I'm trying to display an image in the menubar.

My layoutmenu.xhtml:

Code: Select all

<ps:menu>
        <f:facet name="options">
            <p:commandButton type="button" icon="fa fa-envelope Fs18 white" class="Fright"/>
        </f:facet>
		
		<p:menuitem value="" icon="myIcon" outcome="index"/>

        <p:separator />
.....
my template:

Code: Select all

<h:outputStylesheet library="css" name="style.css"/>
and my css:

Code: Select all

.myIcon{
	background-image:url("#{resource['images/logo.gif']}") !important;
	height: 15px;
	width: 15px;
}
in p:menu it is displayed but in ps:menu not?!

Thx for help!
Netbeans 8, Tomat 8.0.3.0, PF5 RC2, JSF2.2.7 ,jre8

cagatay.civici
Prime
Posts: 18098
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

06 Apr 2015, 18:11

You need something like;

Code: Select all

.myIcon:before {
 content: "\f23a"
}
Also I'd suggest using SVG icons and gif-png won't scale and fit your design.

Locked

Return to “Spark”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest