Comparity Training Resources
http://resources.comparity.net

bridge

The CSS standard allows for alternative style sheets. Reasons why you might want to do this include:

  • Allow for users’ tastes
  • Some stylesheets may better suit users with visual difficulties
  • Some stylesheets may emphasise different areas of information

Unfortunately, Internet Explorer does not implement alternative stylesheets. You can implement something similar using JavaScript. At its simplest level, you can just switch between stylesheets using some simple code. With more complex JavaScript, you can partially implement the standard techniques.

Earlier versions of Microsoft Internet Explorer implemented a non-standard box model. Essentially, IE’s model applies the width attribute to the total box (excluding margins). The W3C model applies the width only to the content of the box; the total width is that of the content plus the left & right margins plus the left & right borders.

Microsoft adopted the W3C model, but only as an alternative to their own. The W3C model is rendered when the Browser implements Standards mode; the old IE model renders in Quirks mode.

To enable Standards mode, you need to begin your HTML page with a valid DOCTYPE. The following discuss this in more detail.

CSS styles should always implement standards to guarantee their future compatability. Generally:

  • You should only use Standard CSS: never propriety CSS
  • Only rely on older common features. You can use new features, but only when the usability of the document does not absolutely depend on them.
  • Don’t waste your time on workarounds to get special effects. You will only have fix them when newer browsers implement newer standards.

CSS Menus allow you to turn an ordinary list into a navigation system. Classically done with JavaScript, you can now use CSS to implement the technique. However, with older versions of Internet Explorer (<7), you will need to implement the Whatever:hover technique.

Even with the :hover pseudo class properly working, there is still a lot of adjusting you will need to cater for the positioning quirks of the browsers. A working sample of my own can be viewed here.

Internet Explorer requires special attention with CSS. With bugs and non-standard implementation, you will need to code around them, or include additional code for alternative implementation.

IE Conditional Comments