jQWidgets Forums
jQuery UI Widgets › Forums › Layouts › Splitter › Splitters with north panel
Tagged: jquery splitter
This topic contains 2 replies, has 2 voices, and was last updated by morfeusz 12 years, 3 months ago.
-
Author
-
Hello,
I have some splitter div and some panel div at the top of it.
The height of splitter div is bigger then height of window.
How can I prevent the going out of the window the splitter div?<!DOCTYPE html><html lang="en"><head> <meta name="keywords" content="jQuery Splitter, Splitter Widget, Splitter, jqxSplitter" /> <meta name="description" content="This page demonstrates 4 columns splitter" /> <title id='Description'>This page demonstrates 4 columns splitter. </title> <link rel="stylesheet" href="Libs/jqwidgets-ver2.6.0/jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="Libs/jqwidgets-ver2.6.0/scripts/jquery-1.7.2.min.js"></script> <script type="text/javascript" src="Libs/jqwidgets-ver2.6.0/jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="Libs/jqwidgets-ver2.6.0/jqwidgets/jqxsplitter.js"></script> <script type="text/javascript"> $(document).ready(function () { $('#mainSplitter').jqxSplitter({ width: '100%', height: '100%', panels: [{ size: '20%' }, { size: '80%'}] }); $('#rightSplitter').jqxSplitter({ height: '100%', orientation: 'horizontal', panels: [{ size: '80%', collapsible: false }, { size: '20%' }] }); }); </script> <style type="text/css"> html, body { height: 100%; width: 100%; margin: 0px; padding: 0px; overflow: hidden; } </style></head><body> <div id="enuPanel" style="width:100%; height:50px;"> Menu </div> <div id="mainSplitter"> <div> Left Panel</div> <div id="rightSplitter"> <div> Top-Right Panel</div> <div> Bottom-Right Panel</div> </div> </div></body></html>
Hi morfeusz,
By setting 100% height to your splitter, its height will be 100% of its container’s height. You have an element above the Splitter with height equal to 50px so the page’s height would be: 50px + 100%. That’s more than 100% and that is the reason why the splitter will not be fully visible.
As a solution, define your top element’s height in percentages and your splitter’s height in percentages. Ex: 20% for the top element and 80% for the splitter.Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comBut how to set the menu div to the const value without going out the window??
-
AuthorPosts
You must be logged in to reply to this topic.