Click to See Complete Forum and Search --> : How do we solve this?


jain_ashwini
08-04-2003, 06:37 AM
Hi,

See the following DIV declarations:

<DIV id="ButtonExit" CLASS=ENABLE style="position:absolute;left:875;top:637;">
<DIV id="Exit" CLASS=clsChanExit><TXT ID="btnExit">Exit</TXT></DIV>
<DIV id="GetRecordAndExit" CLASS=clsChanExit><TXT ID="btnGetRecordExit">GetRecord And Exit</TXT></DIV>
</DIV>

I load either "Exit" DIV or "GetRecordAndExit" DIV during the pageload by manipulating style.visibility property of the DIVs.

The problem - I should dynamically be able to change the top property of the text inside the child DIVs (Exit or GetRecordAndExit) depending on the text size. I use ButtonExit.clientHeight property, but I always get a fixed height irrespective of the number of lines the text is wrapped on the DIV.

Exit.clientHeight and GetRecordAndExit.clientHeight always return a value of '0'

FYI, the style used above are -
.ENABLE {
border-style:none;
background-color:transparent;
border-color="#ffffff";
position:relative;
height=136;
width=125;
background-image: 'none';
cursor:hand;
align:center;
}

.clsChanExit {
position: relative;
top: -80;
text-align: center;
font-family: arial;
font-weight: bold;
font-size: 25px;
color: white;
letter-spacing: -0.2mm;
line-height: 8mm;
padding-bottom: 1px;
cursor: default;
}

Ashwin

Khalid Ali
08-04-2003, 07:18 AM
did u use
obj.offsetHeight
property? yet

jain_ashwini
08-04-2003, 11:18 PM
Why do you think offsetHeight should be used here instead of clientHeight?