Those Cross-Browser Blues: How To Develop Web Sites For Both Internet Explorer And Firefox - InformationWeek
09:40 AM
Connect Directly
Moving UEBA Beyond the Ground Floor
Sep 20, 2017
This webinar will provide the details you need about UEBA so you can make the decisions on how bes ...Read More>>

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.

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.

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).

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.

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.

2 of 5
Comment  | 
Print  | 
More Insights
Threaded  |  Newest First  |  Oldest First
How Enterprises Are Attacking the IT Security Enterprise
How Enterprises Are Attacking the IT Security Enterprise
To learn more about what organizations are doing to tackle attacks and threats we surveyed a group of 300 IT and infosec professionals to find out what their biggest IT security challenges are and what they're doing to defend against today's threats. Download the report to see what they're saying.
Register for InformationWeek Newsletters
White Papers
Current Issue
IT Strategies to Conquer the Cloud
Chances are your organization is adopting cloud computing in one way or another -- or in multiple ways. Understanding the skills you need and how cloud affects IT operations and networking will help you adapt.
Twitter Feed
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.
Flash Poll