How to check whether my code is compatible with all browsers or not?
Use different browsers to test it in. Ietester is a tool which already provides the capability to test with different versions of IE.
There are also commercial sites where you can get views/images of how it renders in different sites.
Microsoft provides the Superpreview tool which ships with Expression Web.
Grz, Kris.
You can use a compatibility testing site like BrowserShots but in the end, you can't test it with all browsers (and all of them have serious bugs somewhere).
So just test it with the most important ones (IE7,8,9, Firefox 3.6, Opera 10 and a WebKit based browser like Chrome or Safari).
I concur with these who suggested testing with up to 10 most important browsers, no more. You cannot really afford to test with every browser and nobody does.
So instead of expensive (or cheap and crippled) cross browser testing tools with wide browser support I'd recommend using fast and convenient tools with "good enough" browser support list, such as BrowserSeal