Problem setting up Firefox Mac

I wrote a menu where the total width of the buttons should always be the same width of the menu bar. Therefore, I take spaces and divide them into buttons.

It works on: Windows: FF IE6 IE7 IE8 Mac: Safari Chrome

But it does not work in Firefox on Mac, can anyone think?

You can find an example: http://www.bobkarreman.com/menu_prototype/menu/menu.html

EDIT:

I am doing the following steps:

  • I am calculating spaces.
  • Divide this by the number of buttons and around it.
  • Add this along with the current addition to the button.
  • Of course, there are no problems with rounding. Every time a button addition is added, I subtract it from totalWhitespace, and in the last LI I add totalWhitespace.

So it may be that the last LI gets 1 or 2 pixels less or more.

+3
2

, li, - float, . , -. Math.floor .

+1

console, , , . , marLeft 38 ( last 43), 43 <a>. , console.

, Safari ( <a> padding-left: 39px, padding-left: 40px, ).

: , console, Safari , marLeft 35, 40 ( last).

2: , . . !

0

Source: https://habr.com/ru/post/1729094/


All Articles