resources

Firefox/Mozilla flicker-free drop-down

Example implementation

This example accompanies an article describing the use of CSS the Document Object Model (DOM) in order to avoid a nasty flicker in the Firefox and Mozilla browsers when implementing a drop-down list.

Feel free to examine the source code. For ease of demonstration I’ve put the CSS and JavaScript in-line.

09-Dec-2005: Update

After a reader’s query I’ve modified the stylesheet accompanying this example to prevent the text below the drop-down from being pushed aside. This is achieved by absolutely positioning the drop-down list (which breaks it out of the block structure of the page).