WEB ART & DESIGN SPRING 2010

Monday, April 26, 2010

Cross Browser Compatibility

The more you design websites the more you will need to know about
cross browser compatibility.  If you open your site in Firefox and then
Internet Explorer, chances are it will look different in each browser.
This is because of how the different browsers render different layouts.

There are several good sites for getting a handle on how to deal with this.

http://msdn.microsoft.com/en-us/library/cc351024%28VS.85%29.aspx

http://meyerweb.com/eric/tools/css/reset/index.html

One common issue is with centering
tags.  For all browsers exceptInternet Explorer, setting the margins of the main
tag at auto will centereverything.  IE does not recognize the auto formatting so we have to add
extra code to account for this.  Here is the code you will need to add to your
CSS to center your page for IE and not have all of your text centered at the
same time:

body {
text-align: center; /* for IE */
 }
#container {
  margin: 0 auto;   /* align for good browsers */
  text-align: left; /* counter the body center */
 }
Let me know if you have any questions!
~Lisa Marie







No comments:

Post a Comment