Thomas Fuchs
Hi, I'm Thomas Fuchs. I'm the author of Zepto.js, of, and I'm a Ruby on Rails core alumnus. With Amy Hoy I'm building cheerful software, like Noko Time Tracking and Every Time Zone and write books like
   Want me to speak at your conference? Contact me!

The case of the disappearing element

December 7th, 2011

Browsers have lots of bugs—among them a tendency to introduce issues where elements just completely vanish (most of the time, that’s a result of over-eager drawing optimization code).

Here’s how you can deal with this issue in some browsers.

On Internet Explorer, you may have met the zoom CSS property before:

zoom: 1;

Basically, this forces IE into using a different rendering engine for the affected elements, potentially fixing the problem.

On Chrome, which seems to not get tested too well before releases, I’ve had luck with:

-webkit-transform: translateZ(0.00001px);

Sometimes, a -webkit-transform:scale(1) might do the trick, too (This should also help in case you hit this problem on Safari.)

If you hit this issue on other browsers, or have different solutions, please send me a mail and I’ll add your findings!