News
News
8/24/2007
09:40 AM
Connect Directly
Google+
Twitter
RSS
E-Mail
50%
50%

Those Cross-Browser Blues: How To Develop Web Sites For Both Internet Explorer And Firefox

If you're trying to develop sites that will be compatible with IE, Firefox, and Opera, watch out -- there are still a lot of speed bumps out there. We examine six of them and let you in on some solutions.

1
Quirky Implementations Of Layout Functions

This is the most common place where people run into issues. They create something in one browser, and then find that the way it's rendered in another simply isn't the same because there are different unspoken assumptions at work about how the standard is to be implemented.

Solution:
The first thing to do is find out specifically what's not implementing correctly. If you're looking at a page in IE and text is not flowing correctly or behaving as it's expected to within a box, such as a DIV or SPAN, there's a chance you may be dealing with IE's quirky box model, which handles boxes a little differently from the Mozilla method. There's also a key difference in the way IE and Firefox handle an overflowing box, and IE's odd handling of non-enclosed floats (another box-related issue) is something that still persists with IE 7. The pages I've linked to here dissect the problems in detail and demonstrate a couple of workarounds.

A great many examples of these kinds of deviations can be seen on the QuirksMode site, but it has not been updated recently -- the compatibility grids don't mention IE 7 at all. But you can run live tests against many different HTML, CSS, and JavaScript standards and functions, and see how they behave (or don't behave) in any given browser. There's also a detailed discussion of this sort of thing (from the POV of a Firefox-friendly designer) on the Computer Gripes site. He goes into some detail about specific sites that have caused trouble for Firefox, and describes specific behaviors that may vary (such as horizontal rules created with the HR tag).

2
Proprietary IE-Only HTML Tags

IE's implementation of Web standards includes a whole slew of ad hoc additions to the HTML tag library that don't show up elsewhere. Most of these seem to have been on the wane, but every now and then you run across a site where they still haven't been eliminated.

Solution:
The only viable long-term solution is to move away from proprietary tags, since the few that are really worth using often implement functionality that can be done in a proper cross-browser fashion anyway. Those that aren't cross-browser are usually frivolities.

A simple example: The bgproperties attribute for the body tag allowed you to keep a background image on a page stationary while someone scrolls through the page. This particular method doesn't work in other browsers other than IE, but there is a CSS style attribute -- background: fixed -- that accomplishes the same thing on both IE and Mozilla.

Another proprietary tag I've seen used in IE, but not widely (thank goodness), and that can and should be done away with, is the CSS font / image filter system. This employs the filter: statement in a CSS style declaration to add various kinds of post-processing to images and fonts directly on a Web page. There are some examples on David J. Hark's Web site; view this page in IE and then in Firefox to see the differences. This is the sort of thing that can be dropped into the same trash can as the blink tag, if only in the name of good taste.

Previous
2 of 5
Next
Comment  | 
Print  | 
More Insights
Register for InformationWeek Newsletters
White Papers
Current Issue
InformationWeek Tech Digest, Dec. 9, 2014
Apps will make or break the tablet as a work device, but don't shortchange critical factors related to hardware, security, peripherals, and integration.
Video
Slideshows
Twitter Feed
InformationWeek Radio
Archived InformationWeek Radio
Join us for a roundup of the top stories on InformationWeek.com for the week of December 14, 2014. Be here for the show and for the incredible Friday Afternoon Conversation that runs beside the program.
Sponsored Live Streaming Video
Everything You've Been Told About Mobility Is Wrong
Attend this video symposium with Sean Wisdom, Global Director of Mobility Solutions, and learn about how you can harness powerful new products to mobilize your business potential.