Joe MooreJoe Moore
Standup 9/16/2008: Hiding divs, Hpricot hates Windows
edit Posted by Joe Moore on Tuesday September 16, 2008 at 04:31PM

Interesting Things

Ask for Help

"We need to hide a flash widget without setting it to display:none, which causes it to be loaded from the server again when display:none is removed."

Hit me with your div-hiding techniques!

  • Move it off the screen with position:absolute; left:-9000px
  • Shrink it down to nothing with visibility:hidden;height:0;width:0 but watch out for any IE 6 minimum height/width issues
  • Similar to the above, hide it with width:0;overflow:hidden;

Comments

  1. Tim Haines Tim Haines on September 17, 2008 at 09:50PM

    Perfect timing on hiding divs - was about to implement first thing this morning, and didn't know about the flash reloading.

    Quick note - for valid css, the left: -9000 needs a unit, so make it left:-9000px

    left: -9000 doesn't work in FF 3.

    Tim.

  2. Joe Moore Joe Moore on September 18, 2008 at 04:38AM

    @tim

    Nice catch -- fixed!

  3. Aaron Aaron on September 20, 2008 at 12:36AM

    Was there something in this standup about the coolest "share this" Rails plugin...?