🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.javascript
Article #49217

Re: Wysokość DIV / JS

#49217
From: Peter
Date: Fri, 14 Aug 2009 17:44
22 lines
1463 bytes
Grzegorz Brycki pisze:
> Witam,
> 
> Chcę aby jeden div był takiej samej wysokości jak drugi div,
> przy czym wysokość drugiego div jest regulowana automatycznie ilością 
> tekstu który jest weń wpisany.
> 
> Ten wpis poniższy działa poprawnie tylko w Mozilli w Safarii nawet nie 
> drgnie.
> 
> Co jest nie tak?
> 
> var divHeight = ((document.getElementById('papier').offsetHeight) + 'px');
> document.getElementById('prawa').style.height = divHeight;

Spróbuj:

var divHeight = 
(parseInt((document.getElementById('papier').offsetHeight), 10) + 'px');

-- 
Peter
Technical Details
Message-ID: <h647jd$mta$1@node2.news.atman.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!news.nask.pl!news.nask.org.pl!newsfeed.atman.pl!not-for-mail
References: <h645h0$fm6$1@news.onet.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!news.nask.pl!news.nask.org.pl!newsfeed.atman.pl!not-for-mail
From: Peter <peter.may@poczta.fm>
Newsgroups: pl.comp.lang.javascript
Subject: Re: Wysokość DIV / JS
Date: Fri, 14 Aug 2009 19:44:22 +0200
Organization: ATMAN
Lines: 22
Message-ID: <h647jd$mta$1@node2.news.atman.pl>
References: <h645h0$fm6$1@news.onet.pl>
NNTP-Posting-Host: inet20908nh-3.nat.umts.dynamic.eranet.pl
Mime-Version: 1.0
X-Trace: node2.news.atman.pl 1250271662 23466 213.158.196.111 (14 Aug 2009 17:41:02 GMT)
X-Complaints-To: usenet@atman.pl
NNTP-Posting-Date: Fri, 14 Aug 2009 17:41:02 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.22 (Windows/20090605)
In-Reply-To: <h645h0$fm6$1@news.onet.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit