Article View: pl.comp.lang.javascript
Article #39333cd. wyrownanie z planowana roznica (wyroznanie i potem skrocenie lewej)
From: Marek Łapiński
Date: Tue, 04 Apr 2006 23:42
Date: Tue, 04 Apr 2006 23:42
54 lines
2107 bytes
2107 bytes
Witam
Zle moze opisalem o co mi chodzi :(
"
...
function rownosc()
{ var a1w=document.getElementById('a1').offsetHeight;
var a2w=document.getElementById('a2').offsetHeight;
document.getElementById('a1').style.height=(a2w>a1w)? a2w+"px" :
a1w+"px";
document.getElementById('a2').style.height=(a1w>a2w)? a1w+"px" :
a2w+"px";
var a2w=document.getElementById('a2').offsetHeight;
var a1w=document.getElementById('a1').offsetHeight;
document.getElementById('a2').style.height=(a1w>a2w)? a1w+"px" :
a2w+"px";
document.getElementById('a1').style.height=(a2w>a1w)? a2w+"px" :
a1w+"px"; }
...
#a1 {background: red; float:left}
#a2 {background: green; float:left}
...
<body onload="rownosc()">
<div id="a1">t<br>e<br>k<br>s<br>t<br>1</div>
<div id="a2"><br>t<br>e<br>k<br>s<br>t<br><br>2<br><br></div>
...
"
Chodzi to tak:
|---| |---|
| t | | |
| e | | t |
| k | | e |
| s | | k |
| t | | s |
| | | t |
| 1 | | |
| | | 2 |
| | | |
|---| |---|
, a chce by chodzilo tak (wyrownanie stron i skrocenie lewej o 30pix)
|---| |---|
| t | | |
| e | | t |
| k | | e |
| s | | k |
| t | | s |
| | | t |
| 1 | | |
|---| | 2 |
| |
|---|
Co w kodzie zmienic by tak bylo?
pozdrawiam
<ml>
Technical Details
Message-ID:
<e0v094$50t$1@achot.icm.edu.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news2.icm.edu.pl!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news2.icm.edu.pl!not-for-mail From: Marek Łapiński <marek.lapinski@data.pl> Newsgroups: pl.comp.lang.javascript Subject: cd. wyrownanie z planowana roznica (wyroznanie i potem skrocenie lewej) Date: Wed, 5 Apr 2006 01:42:50 +0200 Organization: http://news.icm.edu.pl/ Lines: 55 Message-ID: <e0v094$50t$1@achot.icm.edu.pl> NNTP-Posting-Host: sub206-240.elpos.net Mime-Version: 1.0 X-Trace: achot.icm.edu.pl 1144194148 5149 85.193.206.240 (4 Apr 2006 23:42:28 GMT) X-Complaints-To: abuse@icm.edu.pl NNTP-Posting-Date: Tue, 4 Apr 2006 23:42:28 +0000 (UTC) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Priority: 3 X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MSMail-Priority: Normal Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit