当与Richfaces结合使用时,Primefaces确认对话框未居中 [英] Primefaces confirm dialog not centered when used in conjuntion with richfaces

查看:64
本文介绍了当与Richfaces结合使用时,Primefaces确认对话框未居中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

按照我的问题标题,当我使用richfaces,特别是rich:popupPanel时,我的素数确认对话框p:confirmDialog被置于顶部/左侧对齐.如果我删除了richfaces弹出面板,则primefaces对话框将按预期方式在浏览器窗口中居中.

As per my question title, when I use richfaces, specifically a rich:popupPanel, my primefaces confirm dialog, p:confirmDialog, gets placed top/left justified. If I remove the the richfaces popup panel the primefaces dialog gets centered in the browser window as expected.

我尝试更改名称空间条目的顺序,但是没有用.我还能尝试什么.我看到richfaces也有一个确认对话框,我将要研究该对话框,只是我已经在其他页面上使用了primefaces版本,而碰巧没有richfaces弹出面板.

I tried changing the order of the namespace entries but that didn't work. What else can I try. I see richfaces also has a confirm dialog that I'm going to look into, it's just that I already had the primefaces version working on other pages, that happen to not have the richfaces popup panel.

如有必要,我可以发布代码.

I can post code if necessary.

推荐答案

您不应同时使用Richfaces和Primefaces.就CSS和javascript而言,它们之间有如此多的冲突.您可以通过覆盖它们并在每个设置的末尾使用'!important'来解决css问题. 例如

You should not use Richfaces and Primefaces together. There so many conflicts between them both in terms of css and javascript. You can solve css problems by overwriting them and using '!important' at the end of each setting. for example,

.class{
    //...
    text-align: center !important
}

但是,最好的选择是只使用素字

However, Your best bet is to use just primefaces

这篇关于当与Richfaces结合使用时,Primefaces确认对话框未居中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆