/    Sign up×
Community /Pin to ProfileBookmark

How do we solve this?

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

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliAug 04.2003 — did u use

obj.offsetHeight

property? yet
Copy linkTweet thisAlerts:
@jain_ashwiniauthorAug 05.2003 — Why do you think offsetHeight should be used here instead of clientHeight?
×

Success!

Help @jain_ashwini spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.1,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...