3

I have a JSF page with from. I also use Primefaces. At the bottom of the page I have two buttons which execute the JSF form:

<div id="settingstwodivthree" style="width:400px; height:60px; position:absolute;  background-color:transparent; top:380px; left:800px">
    <p:commandButton value="Save Settings" id="ajax" actionListener="#{GeneralController.updateDBSettings}" rendered="true" update="growl,settingsupdate"/>
    <p:commandButton value="Default Settings" id="defaultsettings" actionListener="#{GeneralController.defaultSettings}" rendered="true" update="settingsupdate"/>                  
</div> 

When I add Primefaces into the JSF page the default layout of the button is changed. It seems that css file from Primefaces is overriding the layout of the buttons.

I added this into the web.xml file:

<context-param>
    <param-name>primefaces.THEME</param-name>
    <param-value>none</param-value>
</context-param>

But the problem is still there. Is there any way some how to disable the css overriding?

Ravindra S
  • 6,302
  • 12
  • 70
  • 108
user1285928
  • 1,328
  • 29
  • 98
  • 147
  • The styles on the div will be applied but if you have defined styles for the buttons in a separate stylesheet then see this answer http://stackoverflow.com/questions/8578494/how-to-override-stylesheets-of-primefaces/8581199#8581199 – Ravi Kadaboina Jul 18 '12 at 03:11
  • Which version of primefaces are you using? The primefaces.THEME setting had some problems in some versions. Agree also with Ravi about CSS. Define your CSS Styles directly in p:commandbutton – ppapapetrou Jul 18 '12 at 07:06
  • I use the latest stable - 3.3.1 – user1285928 Jul 18 '12 at 12:34
  • Read through the PF documentation there you will find a section called Skinning for each component and then apply your styles on the itself – Ravi Kadaboina Jul 18 '12 at 15:01

1 Answers1

7

hi i had the same problem with the remaining primefaces.css, i solved it by placing an empty file in this folder, to override the primefaces file

WebContent\resources\primefaces\primefaces.css
wutzebaer
  • 14,365
  • 19
  • 99
  • 170