The short answer is
in as many as possible. The reality of the situation, however, may be a little different.
In an ideal world, you'd test your site in every browser in existence because in that Utopian world you want every single person who might visit your site to have the same experience, but of course this isn't possible for a number of reasons.
Older browsers won't support the CSS you've used to make your site look great in modern browsers to the same level and then there's considerations of screen resolution, and browser window and text size which are a whole different ball game. And, of course, all of this testing is going to be dependant on how large a budget has been allocated to a project and how much of that can be allocated to time spent testing.
So the answer to the original question will fall into two parts:
- What is the minimum set of browsers I should test in?
- What is the complete set of browsers I should test in?
The answer to the second question will be subjective based on the project and developer so I'll just offer up my own personal testing regimen.
Minimum browser test suite
The answer to the first question, however, should be:
- Firefox (latest version)
- Opera (latest version)
- Internet Explorer (6 and 7)
As discussed previously, testing in these browsers will mean there is a high likelihood of your site looking right in not only those browsers, but also Mozilla, Seamonkey, Netscape, Camino, Safari and Konqueror across Windows, Mac and Linux platforms, which the stats for my site for September shows account for 97.87% of all visitors.
However, I did only say 'high likelihood' which means there may still be issues in the browsers you haven't yet looked at. So, I personally like to test in:
- Windows Firefox 1.0.7 & 1.5, Internet Explorer 5.01, 5.5, 6 & 7, Mozilla 1.7, Netscape 7.2, Opera 8.5 & 9
- Mac Camino 1.0, Firefox 1.0, 1.5, Internet Explorer 5.2.3 (OSX) & 5.1.7 (OS9), Mozilla 1.7, Netscape 7.2, Opera 8.5, Safari 1.2, 1.3 & 2.0
- Linux Firefox 1.5, Konqueror 3.4, Mozilla 1.7, Opera 9
which means that (according to my site stats), the layout is guaranteed to look the way I want for 99.98% of visitors. (I always try and test my layouts at a variety of screen resolutions and window and text sizes so even though the layout may not look exactly the same as it would at default text size on a maximised window viewed at 1024 x 780 screen resolution, I'm happy that the layout is still usable, looks OK and is not actually 'broken'.)
The users I'm not checking for are those using IE5.00, Netscape 4-5, NetNewsWire, Lynx and a group that AWStats reports as 'unknown'.
Some would argue that it's not worth supporting IE5 anymore, particularly IE5 for the Mac, which Microsoft has officially dropped support for and my stats would seem to back up that claim with IE5 browsers only accounting for 0.005% of this month's visitors. But I still have clients requesting that IE5 be included and to be honest, I find adding a few rules to overcome both the Windows and Mac versions' shortcomings to be a fairly quick and painless process.
As I said before, how many of these browsers you test in will largely be dependant on how much time/money you have. But the cost of setting up different machines running different operating systems to test all those browsers need not be a factor. I have the different versions of Firefox, IE and Opera installed on my PC and use Browsercam to test the rest.
Running other browsers
For any browsers that you don't have but would like to install, Evolt has a comprehensive browser archive. To set up the different versions of IE on your system so that they can all run concurrently and accept conditional comments, Taming Your Multiple IE Standalones is essential reading.
As you work more with CSS, the less time you'll find you have to spend fixing problems in the 'minority' browsers as they are less likely to appear because your CSS is right in the place.