dhtmlxTabBar and sizing

I have been having display issues when trying to use dhtmlxTabBar and the auto sizing features. The original issue I was having was that the initially displayed content region was being set to a larger size than specified, and the browser’s horizontal scroll bar was appearing and content was flowing off to the right of the page. I did notice that if I resized the browser and added/removed only height (not affecting the width) after the initial render, the content region would shrink to the expected size within the browser.



I have been having difficulty preparing a sample to show the above problem, however I did find an issue along the way which might point to a solution to the problem above. Using the sample below, compare the content when placed within the tabbar region against the same content outside of the context of the tabbar. The height and width are not the same. Is there something that I am doing wrong?











TabBar Test





BODY {

margin: 0;

padding: 0;

}

#mainFrame {

border: 1px solid red;

padding: 10px;

}

.content {

background-color: lightblue;

padding: 5px;

}

#referenceHTML {

border: 1px solid #91A7B4;

}

.innerContent {

background-color: white;

padding: 5px;

}

















Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In massa odio, rutrum ac, ultricies sed, commodo nec, ipsum. Etiam congue vulputate nulla. Curabitur tortor. Aenean quam sapien, lobortis pellentesque, sodales eu, tempus quis, purus. Pellentesque leo velit, dapibus quis, vulputate ac, faucibus vel, magna. Vestibulum tincidunt iaculis dui. Integer velit. Etiam fringilla enim et mauris. Etiam quis justo non augue vehicula adipiscing. Aliquam nec nisl. Proin odio felis, tincidunt quis, vestibulum quis, pretium non, velit. Aenean ante. Nam laoreet, felis vel sagittis dapibus, metus metus elementum mi, eget fermentum lorem mi eget velit. Aenean rutrum augue eget mi. Quisque adipiscing elit vel turpis. Ut lobortis venenatis nulla. Aenean velit. Nunc ac libero. Nullam sit amet risus vel nulla facilisis scelerisque.














Reference HTML






Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In massa odio, rutrum ac, ultricies sed, commodo nec, ipsum. Etiam congue vulputate nulla. Curabitur tortor. Aenean quam sapien, lobortis pellentesque, sodales eu, tempus quis, purus. Pellentesque leo velit, dapibus quis, vulputate ac, faucibus vel, magna. Vestibulum tincidunt iaculis dui. Integer velit. Etiam fringilla enim et mauris. Etiam quis justo non augue vehicula adipiscing. Aliquam nec nisl. Proin odio felis, tincidunt quis, vestibulum quis, pretium non, velit. Aenean ante. Nam laoreet, felis vel sagittis dapibus, metus metus elementum mi, eget fermentum lorem mi eget velit. Aenean rutrum augue eget mi. Quisque adipiscing elit vel turpis. Ut lobortis venenatis nulla. Aenean velit. Nunc ac libero. Nullam sit amet risus vel nulla facilisis scelerisque.













I think mentioned problem already fixed in latest dev. build - please try to use attached js file instead original one ( with it your sample works correctly for me )

tab_1180951846.ZIP (7.82 KB)

The right edge of the rendered tab area is still not correct.  To see what I am talking about, re-adjust the browser width slightly a few times and you will notice that it does not always respect the padding of 10px set on the mainFrame DIV.  The margins and colored border within the rendered tab content area do appear a little much more like the source data now.  The updated scripts also now produce a problem in Firefox where the reference HTML section is shoved way down the page.

The problem in FF caused but not full syntax of init command
just use
    tabbar.enableAutoReSize(true,true);
instead of
    tabbar.enableAutoReSize(true);

because in case of missed param it use 100% instead of autosize

The problem with padding is not related to tabbar itself , tabbar creates content zone correctly and prevent scrolling appearances, but blue bordered zone is you content, and the widht of it is not related to tabbar while it doesn’t cause scrolling ( enableAutoReSize - automatically adjust widht according settings, you have not any widht defined so it set to 100% )