css - 如何在 PrimeFaces 中设置 OrderList 宽度

标签 css jsf primefaces

如何在 Primefaces 中更改 ListOrder 的宽度?

我试过宽度或样式,但它不符合我的要求。它通过滚动保持很小:

a busy cat

你有什么想法吗?

我尝试使用 CSS:

    .orderlist {
        width:1000px;
    }

和 p:orderList styleClass="orderlist"...

这样做,我的页面变大了,但包含数据的区域(并且可滚动列表仍然很小。

最佳答案

Coloque este código em style.css

.ui-orderlist .ui-orderlist-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow:auto;
    height:200px;
    width:100%;
}

.ui-orderlist .ui-orderlist-list li {
    margin: 1px;
    padding: 2px;
}

.ui-orderlist .ui-orderlist-button {
    display:block;
    margin-bottom:0.3em;
}

.ui-orderlist .ui-orderlist-button.ui-button-text-icon-primary {
    width:100%;
}

.ui-orderlist .ui-orderlist-item {
    cursor:pointer;
    border:0px none;
    font-weight: inherit;
}

.ui-orderlist .ui-orderlist-caption {
    text-align: center;
    padding:4px 10px 4px 10px;
    border-bottom:0px none;
}

.ui-orderlist table {
    width:100%;
    border-collapse:collapse;
}

关于css - 如何在 PrimeFaces 中设置 OrderList 宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18851153/

相关文章:

jquery-ui - 带有 Primefaces 的 JQuery UI

css - PrimeFaces p :selectOneMenu width

html - 我们网站的 CSS 内容区域在不应该滚动的时候滚动

html - CSS、HTML 和 DIV ID

javascript - 在复选框类型中单击后选择文本框

jsf - 单击命令按钮时如何在 PrimeFaces 灯箱中打开页面?

JSF 为 h :selectOneMenu (if nothing selected) 自定义验证消息

java - 使用 Facelets 在 Java Server Faces 中创建一个 "Edit my Item"页面

java - 加载的记录未显示在 View 中

html - CSS 类适用,但样式不会改变