From: Leif W <war...@us...> - 2004-11-30 23:25:34
|
The DynAPI does it different. Maybe things have changed since the days when this worked, or maybe never worked, I dunno. api/dynlayer_base.js; 210-216 p.setVisible = function(b) { //! Overwritten by NS4 //if (b!=this.visible) { this.visible = b; if (this.css) this.css.visibility = b? "inherit" : "hidden"; //} }; api/dynlayer_ns4.js; 209-214 p.setVisible = function(b) { if (b!=this.visible) { this.visible = b; if (this.css) this.css.visibility = b? "inherit" : "hide"; } }; Perhaps it would help to toggle both the display (none, 'previous') and visibility (hidden, visible, or 'previous' for the non-standard CSS) properties, if they exist. If these differ for each browser now, maybe we can just add browser specific versions to each browser specific file (_ie, _ns4, _dom or new _mozilla, _opera, _etc. if needed). About the 1px IE problem, I don't know how ugly this is, but is there ever a condition where a layer does in fact have a zero height? For IE, maybe we could just create a dummy blank layer, and use it whenever we need or want size zero. Otherwise, as suggested, we don't fix but just plan the design work accordingly, and have a note to this effect in the docs and example page. I don't like that option so much, but well there's only so much you can do sometimes when a browser doesn't do what you hoped. Leif ----- Original Message ----- From: "Adeola Awoyemi" <awo...@ya...> To: <dyn...@li...> Sent: Tuesday, November 30, 2004 17:55 Subject: Re: [Dynapi-Help] Making a inline layer dissapear completely (collapse) in IE > I would do the same as Jesse said by setting 'display: none' using > javascript to set the css style property: > > document.layer.style.display = none; > > Adeola. > > Arijit Das wrote: > > Hi All, > > > > I've been playing with this for a while for pet project, and found that > > there is no way to to get rid of a 1 pixel height in a div in IE. > > > > Here's what happens in IE: > > 1. If the div starts with no content and the height is 0 > > 2. you add content and the height goes to the content height. > > 3. you remove content and the div height shrinks to 1 pixel, no matter > > what. > > > > I've tried setting the font size to 0, using a 0px height img, etc. and > > nothing works. Finally, I just incorporated the 1px height into my design. > > > > Here's what I had been working on, in case anyone wants to see the code: > > http://www.proteinmedia.com/main/0406/index.php > > > > Click on 'pictures' and 'words' to toggle content. It's pretty simple, > > but maybe it will help someone. > > > > Arijit > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > |