Jump to content

saila.com

Online media matters

Living Can Kill You

CSS rollovers; DOM’s range

For a while, I was planning on implementing a type of pure CSS rollover in way similar to Holovaty.com has. In the end, I didn’t do it for much the same reasons his readers are commenting about: the jumpy text. Nevertheless, I’m glad Adrian did follow through, if only to get responses to a usability issue I only speculated about.

Too bad there isn’t an easy way to control the presentation of the :hover text, as it would be a great to cull some JavaScript.

After playing with the DOM to rearrange the placement of text on the page, I finally discovered the Range Interface (no idea how I didn’t see it before). Haven’t yet played with it, but it looks like it does what I was trying to do with obj.cloneNode(deep), newObj.appendChild(), parent.removeChild().