🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.javascript
Article #55

Re: NN6,IE5: setting DIV attribute height when undefined ?

#55
From: Wolfgang Schwarz
Date: Tue, 09 Jan 2001 17:33
27 lines
2049 bytes
hi,

Veronique Quiby wrote:

> <div id="1"> blablabla </div>
> <div id="2" style="visibility:hidden"> blablabla </div>
> <div id="3"> blablabla </div>

> When my page is loaded, div id=2 is hidden. Therefore there is a hole
> between div 1 and 3.
> I would like to move up div id=3.

use "display:none" instead of "visibility:hidden".

> var div = document.getElementsByTagName("div");
> alert("Value of height for div[0]:  "+ div[0].getAttribute("height"));
> There is no value on the alert window.

sure. You haven't set an attribute "height" in the DIV tag, have you?
There are ways to get the computed size of elements, but I guess you
don't need them anymore... ;-)

wo.

BTW: Your choice of newsgroups was a bit strange. What about
comp.lang.javascript next time?
Technical Details
Message-ID: <3A5B4B59.A18A9108@gmx.de>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!212.197.156.73!not-for-mail
References: <3A5B41E3.A1122231@studi.epfl.ch>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10731d,fc96a9b46aa7d407
X-Google-Attributes: gid10731d,public
X-Google-Thread: fb3cb,fc96a9b46aa7d407
X-Google-Attributes: gidfb3cb,public
X-Google-Thread: ffb5d,fc96a9b46aa7d407
X-Google-Attributes: gidffb5d,public
X-Google-Thread: fcc66,fc96a9b46aa7d407
X-Google-Attributes: gidfcc66,public
X-Google-ArrivalTime: 2001-01-09 09:34:00 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!212.197.156.73!not-for-mail
From: Wolfgang Schwarz <seinsverweigerung@gmx.de>
Newsgroups: comp.lang.javascript,borland.public.intrabuilder.javascript,de.comp.lang.javascript,netscape.public.beta.feedback.javascript
Subject: Re: NN6,IE5: setting DIV attribute height when undefined ?
Date: Tue, 09 Jan 2001 18:33:13 +0100
Lines: 27
Message-ID: <3A5B4B59.A18A9108@gmx.de>
References: <3A5B41E3.A1122231@studi.epfl.ch>
NNTP-Posting-Host: 212.197.156.73
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: fu-berlin.de 979061638 10596021 212.197.156.73 (16 [18616])
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en