Last Friday, I updated my browser on my Vista laptop to IE8.  I then checked my web site www.JohnStagich.com with the new browser.   Three of my web pages did not render as they did with IE7.  After spending a good amount of time tinkering with CSS style sheets and the like, I finally was able to get the web pages to look “similar” in IE7, IE8, and Firefox 3.0.8.  What a hassle.  Here is some of the code I used to achieve the similar look:

        var name = Request.Browser.Browser;

        HttpBrowserCapabilities bc;

        bc = Request.Browser;

 

        if (name == "IE" && bc.Version == "8.0")

        {

            btnSend.Style.Add("margin-left", "205px");

        }

        if (name == "IE" && bc.Version == "7.0")

        {

            btnSend.CssClass = "txtFloatLeft";

            btnSend.Style.Add("margin-left", "172px");

        }

        if (name == "Firefox")

        {

            btnSend.CssClass = "txtFloatLeft";

            btnSend.Style.Add("margin-left", "152px");

        }

I then read an article in Computerworld about browser compatibility.  It turns out that Microsoft is making an effort with IE8 to make it much more World Wide Web Consortium (W3W) compliant then previous versions of Internet Explorer.  Hence, the rendering changes of my web site with IE8. 

One developer in the article suggests devloping your web code first with Firefox and then making the necessary adjustments for the IE browsers.

If you are interested in finding out more about the differences between browsers, here is a good reference that contains compatibility tables for the different browser versions: QuirksMode.org.

John