Javascript and CSS both interact with the objects on a web page via the Document Object Model or DOM.
To really understand and be able to use javascript you need to understand the DOM.
This is why web pages appear differently in different browsers and in different versions of the same browser, they each have their own slightly different Doms.
Dom level 0 was introduced by Netscape for version 2 of its browser so that form elements could be accessed.
The Netscape 4 dom was introduced to add some dhtml features
Microsoft then introduced its own, new and different Dom for its version 4 browser and just to confuse the issue called it the Dhtml Object Model.
Chaos reigned with cross browser compatibility becoming a headache for web developers.
Scripting web pages required different code for each browser.
The W3C took charge and provided an aspirin in the form of the DOM level 1 standard.
Fortunately the newer versions 5,6,7 of the various browsers use doms that are more in line the W3C standards.
Regretably no browser is 100% compliant with the W3C standard yet.