Q:

css stretch floating div horizontally

I'm trying to make a div with a static height and variable width. With multiple horizontal tabs. The active tab should stretch horizontally to fill the container and the inactive tabs should shrink back down to their inactive size (24px in this case). 
I can't quite get it to work. The tab stretches, but too much. It bumps the tabs after it to the next line, which shoudn't happen. I can't figure out how to make this work like I want it to.
What I am trying to do can be seen at [link removed]
I'm sure that theres a way to do it, as I've seen it done before, but I can't find an example of it. Know what I'm doing wrong?

A:

Are you looking for a horizontal accordion? 

http://www.leigeber.com/2008/05/horizontal-javascript-accordion-menu/
http://jqueryui.com/demos/accordion/#fillspace

There are several examples online. It may be best to rely on Javascript to do the calculating if you want the open tab to take up all the space MINUS the width of the tabs, of the container.

