|
Posted by Gιrard Talbot on 10/12/06 05:43
ato_zee@hotmail.com wrote :
> On 11-Oct-2006, "Paul Watt" <paulio@wattio.NOSPAMfreeserve.co.uk> wrote:
>
>>>>> Browsers have to follow the W3C-specs, on the
>>>>> other hand they need to render sites as much as possible as the
>>>>> builder has intended to.
>
> So your code and css validate at W3C, yet each browser renders
> differently, IE can render the page different to Firefox,
> and Safari on OS X different again.
> So why doesn't valid code render the same on each browser?
For several reasons, valid markup code and valid CSS code may not render
the same layout in each browsers:
1- browsers have often different default css property values for some
elements. Recently, there has been a movement done by browser
manufacturers (Microsoft, Opera, Mozilla, Apple, etc.) to reduce the
numbers of such occurences. E.g.: IE 7, Opera 9, Firefox 1+, Safari 2.x
all have a default 8px margin on the body element... but this was not
the case just 2 years ago.
2- Browsers have bugs. Simple as that. The browsers that have less bugs
are the ones who have established public feedback systems to report
bugs. The longer they've done that, the more correct their
implementations of specifications are.
3- Valid code will have more/better chance to be correctly rendered (as
intended) when the browsers are triggered to use "standards compliant
rendering mode" (document.compatMode == "CSS1Compat"). The browsers
conform more closely to the spec of web languages (HTML and CSS) when in
standards compliant rendering mode.
4- Valid code could still be very complex code, with a large and deep
DOM tree. This is another phenomenon. Sometimes, new comers to CSS give
a class to every element (or so) and they make the DOM tree very deep.
Browsers have a tendency to produce different layout when the dom tree
gets deep and large.
GΓ©rard
--
remove blah to email me
[Back to original message]
|