views:

59

answers:

2

Hi,

The question is quite theoretical. Let's say you're implementing a normal (or small or complex) theme for a website and IE is an important requirement. The question is: how frequent you would do the design fixes for IE (or any other browser that makes you headache)?

Just a short of my thoughts to raise the debate: If you're doing it frequently, you probably do unnecessary fixes that probably will be changed. Although if you're doing it rarely, you would have to fix too many things.

I'm interested in the efficiency, time and headache factors.

+4  A: 

I suggest developing in a single browser, then testing your layout in multiple browsers at the end. My workflow usually goes like this:

  1. Develop using Safari.
  2. Run finished site code through http://validator.w3.org and correct errors.
  3. Test in IE6, 7, and other browsers.
  4. Apply any amends to the layout using conditional IE comments & stylesheets.

I've found this approach to be much faster than constantly hopping between browsers during development. Writing valid code and checking for obvious errors (step 2) seems to solve a good proportion of early IE layout issues. The rest can be handled with browser-specific rules applied in conditional style sheets.

There are some who'd say that you should develop the site using whichever browser its core audience will be using. The approach has merit, but I tend to work faster in a browser backed by good developer tools that gets great Acid3 test scores.

Others favour solutions like IE7-JS, which uses JavaScript to make early IE versions behave more like modern browsers. This can be the right approach, but any solution depending on JavaScript won't be ideal for all scenarios.

NickD
A: 

You should not fix IE bugs until you're done with the design.

You should keep IE in the back of your head while implementing the design. This will limit the amount of bugs you'll have to fix afterwards. Here are a few guidelines:

Use valid and unambiguous HTML markup

I'm not even talking about full W3 validation against a doctype here, but basic things like:

  • correctly nest your tags
  • close your tags
  • don't use adjacent hyphens HTML comments, unless you're starting or ending a comment
  • encode special characters

In short, leave no room for the browser to interpret your HTML in any other way than the way you intend it to.

Keep your HTML and CSS as simple as possible

Constantly review your implementation and remove obsolete CSS rules and refactor overcomplicated HTML constructs. Also, don't nest your tags too deep. Don't create the ideal environment for IE to make errors.

Avoid constructions of which you know IE will mess up

Whenever you realize you just wrote something IE definitely will mess up, try to use an alternative approach to the problem. Or if there's no other way, at least think of a possible fix for IE in advance and write it down for later reference.

Niels van der Rest