Hi Martin,
1. Coding methodology
-------------------------------
I would recommend coding to standards, but checking across as many browsers
as possible throughout the process of building layouts. The keys are (a) use
as many browsers as possible, (b) check often and (c ) deal with layout
issues as they arise:
A. Use as many browsers as possible
If you use one main browser for building, and only check at the end, you may
find part or an entire layout is broken in another browser. The more
browsers you test on, the less likely you are to come across problems later
in the process. Having said that, recent versions of Mozilla, Opera, Safari
and Firebird are all very standards compliant, so checking against these
browsers is generally a very simple process.
I really don't agree with this. I know you didn't specifically mention IE in your post, but testing across all browsers all the time slows down the speed at which you can build pages -- especially when dealing with IE as well.
Personally, I just work directly in Firefox and Safari, *occasionally* checking it out in Opera and others. Only once I'm happy with all that do I bother with IE.
Why?
IE is not standards compliant, so any time you spend on it, and anything you use in your main style sheet to force IE to behave will bloat you style sheet. This is NOT the point of standards -- we're supposed to be minimising code and keeping things clean and simple, so that everything is forwards compatible.
IE is not a forward-thinking browser. Whilst it may have dominance right now, other browsers, or at least Microsoft's next 'browser' will take over from it, and we'll have thousands or millions of style sheets out there intricately targeting IE 5-6 in a mess of hacks, code and comments.
Instead, I write my style sheets to work on standards compliant browsers, and worry about forwards compatibility, not backwards (or even sideways).
But what about IE, the market leader????
In some cases, the rendering bugs are OK with me, and the layout is still *passable*. In other cases, I write (a) separate style sheet(s) to target IE specifically, cascading over the standards sheets, to bring IE into line.
How?
MS included a great proprietary (but still standards compliant) system of comments called conditional comments. By using these, we can:
a) completely hide these IE-only style sheets from non-IE browsers
b) target the specific versions of IE (from 5 through to 6, including all minor builds)
Sample:
<style type='text/css'>@import(css/main.css)</style>
<!--[if gte IE 5]>
<link rel="stylesheet" type="text/css" href="css/ie.css" />
<![endif]-->My experience tells me that ignoring IE during the build, then looking at it SPECIFICALLY with it's own set of style sheets later saves me heaps of time and grief.
Your mileage may vary though :)
--- Justin French http://indent.com.au
*****************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
*****************************************************
