jQuery UI Widgets › Forums › Layouts › Layout and Docking Layout › how to split page into two parts with one fixed width and another rest width
Tagged: Angular layout, auto, dynamic width, height, jQuery layout, jqxLayout, jqxsplitter, layout, panel, percent, percentage, pixel, width
This topic contains 1 reply, has 2 voices, and was last updated by Dimitar 9 years, 1 month ago.
-
Author
-
November 5, 2015 at 1:00 am how to split page into two parts with one fixed width and another rest width #77773
Hi,
I want to split my page into two vertical panels.
The left panel has a fixed width 240px, and the right panel will use the rest width of page, so that when I change my browser to wider, and the right panel could also meet to the browse’s right edge. Below is my code:CSS:
html, body { height: 100%; width: 100%; }
javascript
var layout = [{ type:'layoutGroup', orientation:'horizontal', width:'100%', height:'100%', alignment: 'left', items:[{ type:'tabbedGroup', width:'240px', height:'100%', allowClose:false, items: [ { type:'layoutPanel', title:'TEST LEFT', contentContainer:'leftPanel' } ] },{ type:'tabbedGroup', height:'100%', allowClose:false, items: [{ type:'layoutPanel', title:'TEST RIGHT', contentContainer:'rightPanel' } ] }] }]; $('#globalContainer').jqxLayout({ width: '100%', height: '100%', layout: layout })
HTML code is:
<div id="globalContainer"> <div data-container="leftPanel"></div> <div data-container="rightPanel" style="overflow: hidden;"></div> </div>
But the result is, the right panel is wrapped to below the left panel, which is not what I want.
How to solve it ?
Many thanksNovember 5, 2015 at 6:13 am how to split page into two parts with one fixed width and another rest width #77779Hi wureka,
Unfortunately, this kind of layout is not supported by the jqxLayout widget. Widths and heights have to either be in pixels or percentages, but not a combination of both. There is not an ‘auto’ setting, either.
This can be achieved with jqxSplitter, though. E.g.: https://www.jseditor.io/?key=jqxsplitter-panel-with-dynamic-size.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.