My JavaScript code successfully resizes and repositions elements on the page to fit the browser window in Chrome, Safari, and Internet Explorer 9, but encounters issues in Firefox. The console in Firefox shows two errors: "TypeError: sidebar.style is undefined" and "TypeError: content.style is undefined".
I have confirmed that I have divs with Id's of "sidebar" and "content", which are also used successfully in my CSS. Why are they suddenly showing as undefined in Firefox?
To add to the confusion, a similar script is being used on another page on the website, but with different Id's specific to that page, and it is functioning properly without any problems. What could be causing this discrepancy?