Nik's Technology Blog

Travels through programming, networks, and computers

IE 6 Bug with Absolute Positioned Layers

How important is it that people should be able to cut and paste from your website?

Having designed a site using nothing but DIV tags instead of using a table structure to lay out a page I find that IE 6 has a problem concerning absolute positioned layers.

The pages look fine, however if you go to select a certain piece of text you'll find that it selects the whole page instead (or at least not the part you wanted to select). Frustrating or what!

After some investigation it seems that a lot of people are discovering this problem. One solution it seems is to remove the XHTML doctype from the document, this forces IE 6 into quirks mode, which renders the page differently, the error disappears, but it stops the page from validating. Solution? I don't think so!

The other solution is to avoid using absolutely positioned elements and use relative ones instead. Surely we are trying to progress website design not hinder it.

I have yet to find a proper solution to the problem or find out if and when Microsoft will fix this bug, however I did come across some javascript that appears to correct the problem, albeit a very dodgy looking hack, seems to do the trick though. The link to the hack is below.

IE 6 Absolute Position Text-selecting hack

Comments are closed