JQuery Portlet - Is it possible to have varying portlet sizes?

JP. picture JP. · Feb 19, 2011 · Viewed 8.1k times · Source

I am using the portlet function of JQuery UI to create a basic portal page. The example on the JQuery UI page shows a pretty simple example with 3 columns and fixed size portlets that fit into those columns. Is there a way to approach this such that varying sized portlets can be used.

Specifically, if i have 3 columns i would like the ability:

1) To have one portlet that spans all 3 columns (3*1) 2) To have one 2*1 portlet and one 1*1 portlet on the same row, thereby taking up all 3 columns 3) Have any variation thereof.

I would greatly appreciate if anyone could give me any pointers,

Thank you

JP

Answer

Alexey Lebedev picture Alexey Lebedev · Feb 21, 2011

http://jsfiddle.net/93F2T/

Based on display as a grid. Use one sortable, and let your portlets wrap to the next line when there's not enough space.

.portlet {
    display: inline-block;
    vertical-align: top;
}