Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Preventing The IE6 CSS Background Flicker

DZone's Guide to

Preventing The IE6 CSS Background Flicker

· Web Dev Zone ·
Free Resource

Jumpstart your Angular applications with Indigo.Design, a unified platform for visual design, UX prototyping, code generation, and app development.

One of the nagging issues that Internet Explorer creates is a flicker on anchor tag background images. Did you know, however, that there is a quick and easy way to prevent that problem using a little bit of javascript? Simply place the following javascript code in the header section of your website, refresh the page, and bid adieu to another IE6 issue.

<script type="text/javascript">
try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
</script>

This script cache's the background in IE6 to prevent a flicker and other browsers ignore the code.

Take a look at the Indigo.Design sample applications to learn more about how apps are created with design to code software.

Topics:

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}