/*CSS for two row tab bar */ /* Two Row CSS - required */ .straightBarWrapper, .straightBarMouseOverTab, .straightBarActiveTab, .straightBarNormalTab { background-repeat: repeat; } /* CSS to stretch the tabs - optional */ .straightBarWrapperInnerTable { margin: 0 auto; width: 100%; } /* min-width set to 100%/# of tabs in the top row (100%/8 = 12.5%) - optional */ .straightBarNormalTab, .straightBarActiveTab, .straightBarMouseOverTab { min-width: 12.5%; }
/*** This script will make your Nav Bar into two rows ***/ // This script will only make two rows var maxTabs = 8; // in top row // Don't change anything below var navbar = $('table.straightBarWrapperInnerTable'); if (navbar.find('td').length > maxTabs) { navbar.find('td:gt(' + (maxTabs-1) + ')') .wrapAll('<tr />').parent().appendTo( navbar ); // set to 80px (twice the background image height) navbar.parent().andSelf().height(80); }
/*** This script will make your Standard Tabs into two rows ***/ // This script will only make two rows var maxTabs = 8; // in top row // Don't change anything below var navbar = $('table.TabBar'); if (navbar.find('td').length > maxTabs) { navbar.find('td:gt(' + (maxTabs-1) + ')') .wrapAll('<tr />').parent().appendTo( navbar ); }
" ].random()
1 3 5 7 2 4 6
1 2 3 4 5 6 7
/* Adjust this width to change the spacing between tabs */ .emptyTab { width: 50px; } /* Adjust this width to move the second row and align it under the first how ever you want */ .firstTab .emptyTab { width: 120px; } .TabBar { margin: 0 auto !important; }
/*** This script will make your Standard Tabs into two rows ***/ var navbar = $('table.TabBar'); navbar.after( navbar.clone(true) ) .removeClass('mBottom') .find('td:odd').html('<div class="emptyTab"></div>'); $('table.TabBar:last') .addClass('SecondRow') .removeClass('mTop') .find('td:even').html('<div class="emptyTab"></div>');