ALA’s New Print Styles + hasLayout

Perplexing little CSS issue that’s dogged me for ages: Why does MSIE have weird positioning some times? It could be because of hasLayout, and all you need to do, is apply position:relative to the CSS declaration:

A List Apart: Articles: ALA’s New Print Styles

The only little oddity here is position: relative. I included that because IE/Win has a tendency to make elements disappear if you pull them upward like this. The cure is to position them, which I suspect triggers the hasLayout flag. I don’t pretend to understand all the nuances of hasLayout, but recent information from Microsoft and third-party sources has shed quite a bit of light on the subject–it would appear that many of the layout problems that bedevil us in IE/Win are the result of an element not having hasLayout.

JSUtilities.js – Nifty little JavaScript Utilities

Here’s an interesting little JavaScript utilities file:

  • array.push (if unsupported)
  • array.shift (if unsupported)
  • function.apply (if unsupported)
  • inArray() [Port from PHP] Hunts for a value in the specified array
  • isArray() [Port from PHP] verifies if something is an array
  • ksort() [Port from PHP] sorts an array by key names
  • addClass() appends the specified class to the object
  • removeClass() removes the specified class to the object
  • lastChildContainingText() finds the last block-level text-containing element within an object

http://old.easy-designs.net/code/jsUtilities/working/jsUtilities.js