简体   繁体   English

从JSF页面删除Primefaces CSS布局

[英]Removing Primefaces CSS layout from JSF page

I have a JSF page with from. 我有一个JSF页面。 I also use Primefaces. 我也使用Primefaces。 At the bottom of the page I have two buttons which execute the JSF form: 在页面的底部,我有两个执行JSF表单的按钮:

<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. 当我将Primefaces添加到JSF页面时,按钮的默认布局会发生变化。 It seems that css file from Primefaces is overriding the layout of the buttons. 看来Primefaces的css文件覆盖了按钮的布局。

I added this into the web.xml file: 我将其添加到web.xml文件中:

<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? 有什么方法可以禁用css覆盖?

嗨我和剩下的primefaces.css有同样的问题,我通过在这个文件夹中放置一个空文件来解决它,以覆盖primefaces文件

WebContent\resources\primefaces\primefaces.css

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM