如何在 Primefaces 中更改 ListOrder 的宽度?
我试过宽度或样式,但它不符合我的要求。它通过滚动保持很小:
你有什么想法吗?
我尝试使用 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/