jobe
jobe

Reputation: 325

How to set OrderList width in PrimeFaces

How can I change the widht of a ListOrder in Primefaces?

I tried with width or style but it does not do want i want. It stays small with a scroll:

a busy cat

Do you have any idea?

i tried with css:

    .orderlist {
        width:1000px;
    }

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

Doing so, my page is larger but the area containing the data (and the scrollable list remains very small.

Upvotes: 0

Views: 3124

Answers (3)

Danilo Rubervany
Danilo Rubervany

Reputation: 21

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;
}

Upvotes: 2

Saubhik Singh
Saubhik Singh

Reputation: 11

Put this code in style.css

.ui-orderlist-list-container {
  width: 70%;
  margin-left: auto;
  margin-right: auto;
}

Upvotes: 1

patstuart
patstuart

Reputation: 1988

The following CSS works fine for me:

.ui-orderlist-list {
    width:300px;
}

Upvotes: 1

Related Questions