How do I put a background image in primefaces
. I've tried some shapes but none worked. The closest to a good result I got was using <p:graphicImage/>
however when I minimize a menu or do a search in the table the image does not accompany the rest of the layout.
See also:
Thisismytemplate:
<h:body><p:layoutfullPage="true">
<p:layoutUnit header="Sistema de Auditorias" position="north"
resizable="false" closable="false" collapsible="false">
<p:toolbar style="height:39px;">
<f:facet name="left">
<p:outputLabel value="Diego Augusto"
style="position: relative;left: 1360px;" />
<p:commandButton value="Sair"
style="height:28px;width:90px; text-align:center;position: relative;left: 1370px;" />
</f:facet>
</p:toolbar>
</p:layoutUnit>
<p:layoutUnit header="Desenvolvido por: TI Unimed Norte Pioneiro"
position="south" resizable="false" closable="false"
collapsible="false">
</p:layoutUnit>
<p:layoutUnit header="Menu Inicial" size="200" position="west"
resizable="false" closable="false" collapsible="false">
<h:form>
<p:panelMenu
style="background-image: url('../images/verdeBrasil.png');">
<p:submenu label="Arquivo">
<p:menuitem value="Página Principal"
outcome="/pages/principal.xhtml" />
<p:menuitem value="Sobre" />
<p:menuitem value="Sair" />
</p:submenu>
<p:submenu label="Auditorias">
<p:menuitem value="Todos Procedimentos"
outcome="/pages/solicitacoesGeral.xhtml" />
</p:submenu>
<p:submenu label="Relatórios"></p:submenu>
</p:panelMenu>
</h:form>
</p:layoutUnit>
<p:layoutUnit position="east" size="400" header="Sobre a Auditoria"
style="text-align:center;" resizable="false" closable="false "
collapsible="true" effect="drop">
</p:layoutUnit>
<p:layoutUnit position="center" resizable="false" closable="false"
collapsible="false">
<ui:insert name="conteudo" />
<h:panelGrid>
<p:graphicImage styleClass="ladoDir.css"
style="height: 73px; width: 900px;" url="/images/verdeBrasil.png" />
</h:panelGrid>
</p:layoutUnit>
</p:layout>
I tried to do this: style="background-image: url('../images/verdeBrasil.png');"
at the beginning of <p:panelMenu>
but did not work either.