Re: Trouble getting page to work in FireFox
- From: Göran Andersson <guffa@xxxxxxxxx>
- Date: Thu, 29 Mar 2007 01:27:32 +0200
John Bailey wrote:
The error as it turns out is that FireFox does not support setting the style.left and style.top to numbers and defaulting to pixels. Apparently you have to specifically specify "123 px" when specifying the position properties. None of the other browsers I tested (IE and Opera) had this restriction.
The standard says that all measurements needs to have a specified unit, unless the value is zero. If you omit the unit, the code is invalid, and the browser may handle it as such.
If a browser adds a default unit to properties, it's adding non-standard behaviour. As the units may not be omitted according to the standard, there are no default unit specified for different properties, and pixels is not the logical default for all properties. The font-size property for example has no singe unit that clearly would be the preferred default, and it's quite a big difference between 10px and 10em. If you write code relying on the chosen default in one browser, another browser may display the page in a completely different way, and neither of them is more right than the other.
If you keep to the standards, the page stands a better chance at displaying the same way in other browsers. After all, you can't try it in all versions of all browsers, especially as the versions of the browsers that will be used to view the page in months or years from now doesn't even exist yet.
--
Göran Andersson
_____
http://www.guffa.com
.
- References:
- Re: Trouble getting page to work in FireFox
- From: Göran Andersson
- Re: Trouble getting page to work in FireFox
- From: Göran Andersson
- Re: Trouble getting page to work in FireFox
- From: John Bailey
- Re: Trouble getting page to work in FireFox
- Prev by Date: Re: extending MembershipUser, need help!
- Next by Date: Re: Adding Controls to a page via external code
- Previous by thread: Re: Trouble getting page to work in FireFox
- Next by thread: Re: Trouble getting page to work in FireFox
- Index(es):
Relevant Pages
|