Thanks so much for the answers of all the guys. But maybe my question was not clear. I am also new to stackoverflow.com, so please take it easy :)
In any case, what I did last night to solve this problem is to use jQuery, delete the current tabs and re-create them, but this time add a fixed number of list / tab items on ul / row. If the tab has more than a fixed number, create a new ul element for them. Each UL element will look like a new line
Here is my javascript / jQuery
// contains tab headers and contents var tabsContainer = $('.tabs'); // this is a UL element containing the tab headers var currentUlElement = $('.tabNavigation'); // this are the LI elemets which are the actual tabs var currentLiElements = currentUlElement.children('li'); // we can only have 6 tabs plus the '+' tab (total 7) in a row. // if there mroe than that we need to sort the overflow if (currentLiElements.length > 7) { // remove all current tab headers currentUlElement.remove(); // create new tab headers container var newUlElementRow = $('<ul />'); // make the list items appear like tabs newUlElementRow.addClass('tabNavigation'); // add the new tabs header container to the front of the main tab/content container control tabsContainer.prepend(newUlElementRow); for (var index = 0; index < currentLiElements.length; index++) { // if one row of tabs is complete if (index == 6) { // create a new tab headers container newUlElementRow = $('<ul />'); // make the list items appear like tabs newUlElementRow.addClass('tabNavigation'); // add the new tabs header container to the front of the main tab/content container control tabsContainer.prepend(newUlElementRow); } // add the tab/list item to the new tab headers container newUlElementRow.append(currentLiElements.get(index)); } // re-enable the tab click actions trackNetPeople.SetupTabs(); }
source share