I have a Zend Framework MultiSelect form element. In Firefox it is wider than in Chrome or Safari.
This is the way it is supposed to behave:
- The actual form element is made 62px thinner than that.
The .width() seems to be working, because I made a div and it got the width right on.
Solved! I just needed to use .outerWidth(true) instead. Width only calculates the very inner part of the div, no border, no padding, no margin.
The browsers had different default values for those, so I needed to use .outerWidth(true), which got the entire width. Now it returns 500px when I test.