₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,346,780 members, 8,525,092 topics. Date: Thursday, 26 November 2026 at 05:35 AM

Toggle theme

Getting The Height Of A Div - Webmasters - Nairaland

Nairaland Forum › Science/Technology › Webmasters › Getting The Height Of A Div (701 Views)

1 Reply (Go Down)

Getting The Height Of A Div by ogzille(op): 3:49pm On Jun 08, 2010
Hello friends,

Is there anyway of getting the height of a div that is [size=13pt]not explicitly set[/size] and [size=13pt]doesnt have a regular content pattern[/size].

Have been thinking bout this
Re: Getting The Height Of A Div by WebMonk(m): 4:02pm On Jun 08, 2010
if you are using Jquery, this is a cinch.

just use the height() function. See the link below:

http://api.jquery.com/height/
Re: Getting The Height Of A Div by DualCore1: 4:08pm On Jun 08, 2010
Hahahahaha, Ogzille knows why I'm laughing.

Webmonk, nice info and thanks for bringing this up as THE solution.
Re: Getting The Height Of A Div by ogzille(op): 4:34pm On Jun 08, 2010
WebMonk, thanks for your idea, but i dont use jquery sad

But, i visited the link you dropped and i saw ow they achieved it:

document.defaultView.getComputedStyle(docObj, ""wink.getPropertyValue("height"wink // non ie

document.getElementById(theElt).offsetHeight // ie

thanks house

@DC, tongue
Re: Getting The Height Of A Div by DualCore1: 5:14pm On Jun 08, 2010
angry undecided
Re: Getting The Height Of A Div by WebMonk(m): 5:54pm On Jun 08, 2010
@ ogzille - glad you got something out.
@DC:

Dual Core:
Webmonk, nice info and thanks for bringing this up as THE solution.
I believe i started my reply with "IF". I'm sure it should go without saying that there are many ways to tackle an issue.

PS(related or not): Some people still appreciate handcoding from scratch before using frameworks
Re: Getting The Height Of A Div by ogzille(op): 6:02pm On Jun 08, 2010
WebMonk:
PS(related or not): Some people still appreciate handcoding from scratch before using frameworks
cheesy wink smiley
1 Reply

Importance Of Div Tags • How To Do Vertical Alignment With Div-based Layouts • Getting The First Character Of Array Values, Php ? • 2 • 3 • 4

Ways To Make Money Online Without Website • Lets Get You The Website You Dream Of: Joslufay Concepts • It Training In South Africa