I wrote a menu where the total width of the buttons should be always the same width of the menu bar. So i take the whitespace and devide it over the buttons.
It works on: Windows: FF IE6 IE7 IE8 Mac: Safari Chrome
But it doesnt work on Firefox on the Mac can does anyone have an idea?
The example can be found: http://www.bobkarreman.com/menu_prototype/menu/menu.html
EDIT:
The steps i take are:
- I Calculate the whitespace.
- Divide that by the number of buttons and round it.
- Add that together with the current padding to the button.
- To be sure there are no rounding issues Each time a add the padding to a button i subtract it from the totalWhitespace and on the last LI i add the totalWhitespace.
So it can be that the last LI gets 1 or 2 pixels less or more.