Dextro
4 Dec 2006, 5:32 AM
I use the splitbar to add aa vertical bar between 2 div's.
function adjustUI(){
var height = YAHOO.util.Dom.getViewportHeight();
YAHOO.util.Dom.setStyle(['centerPane', 'leftPaneSplit','leftPane', 'content'], 'height', height + 'px');
}
With this function, you change the height of the pane after an change of the width. Is there a possibility to change the height automatically to the content of the pane? So I don't get a scrollbar in the div.
jack.slocum
4 Dec 2006, 5:38 AM
Did you try autoHeight() on the Element?
Also, are you able to do it just uses standard non-positioned elements wrapped in a container element? This will allow the content to flow like normal and auto size.
Dextro
4 Dec 2006, 6:22 AM
Sorry, I'm quitte new to the Yahoo UI and your YUI-ext.
I tried the autoHeight() f'ie, but everthing I do breaks the splitbar.
Some example code:
HTML (hmm, submit strips my id-tags...):
<div>
<div>
some text
</div>
<div></div>
<div>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed metus nibh, sodales a, porta at, vulputate eget, dui. Pellentesque ut nisl. Maecenas tortor turpis, interdum non, sodales non, iaculis ac, lacus. Vestibulum auctor, tortor quis iaculis malesuada, libero lectus bibendum purus, sit amet tincidunt quam turpis vel lacus. In pellentesque nisl non sem. Suspendisse nunc sem, pretium eget, cursus a, fringilla vel, urna. Aliquam commodo ullamcorper erat. Nullam vel justo in neque porttitor laoreet. Aenean lacus dui, consequat eu, adipiscing eget, nonummy non, nisi. Morbi nunc est, dignissim non, ornare sed, luctus eu, massa. Vivamus eget quam. Vivamus tincidunt diam nec urna. Curabitur velit. Quisque dolor magna, ornare sed, elementum porta, luctus in, leo.</p>
</div>
</div>
CSS:
#leftPane {
float: left;
padding: 1em 0;
}
#leftPaneSplit{
width: 3px;
float: left;
z-index: 10001;
background: #000;
}
#centerPane{
overflow:auto;
}
JavaScript: See above.
Animal
4 Dec 2006, 6:55 AM
Shouldn't you just use a BorderLayout with west and center regions?
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.