I only used part of your code, and maybe that was stupid. I haven't put any real time into this kind of coding so I just took what I saw as the important, and modified it a bit:
/* General tab settings */
tab {
font-family: tahoma, verdana, helvetica !important;
margin-top: 0px !important; /* Space over tabs and under URL-tab */
margin-bottom: 0px !important;
border-bottom: 1px !important;
margin-left: 1px !important;
height: 18px !important;
display: -moz-box !important;
-moz-box-sizing: border-box !important;
}
/* Unselected tab gets smaller font */
#content tab:not([selected]),
#content tab[selected="false"] {
font-size: 9px !important;
}
/* selected tab will be a bit larger with also enlarged font */
tab[selected="true"] {
font-size: 9px !important;
height: 18px !important;
}
I merged 3 different screenshots/cases into one to save some time and space (the cyan colour is just for bordering):
1. The first case is working perfectly, nicely aligned and all.
2. When I close the last tab to get one tab row again, the first row get really large (part 2 of my screenshot). I figured out that it was my tab width setting in TMP that caused this. I have both min and max width set to 125 so I don't have to have extra space on both sides of the tab bar (I want some empty space to the far right on my tab bar so I have somewhere I can click with my scroll wheel to restore a previously closed tab).
3. I then set min width to 100 and max width to 125 (default settings as far as I can recall?) That results in part 3 of my screenshot, 2 pixels of dead space above the favicon, and some other weird things with the "tab separators" (you probably have to zoom in to see it better).
Remember, this is with the Classic Compact theme and its accompanying extension (for further customizing). I didn't try it with the default Firefox 3 theme (it makes me want to gag everytime I see it, so... :D )
Hope that helps somewhat.