₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,327,769 members, 8,432,535 topics. Date: Tuesday, 23 June 2026 at 08:42 PM

Toggle theme

Getting The Height Of A Div - Webmasters - Nairaland

Nairaland ForumScience/TechnologyWebmastersGetting The Height Of A Div (682 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 TagsHow To Do Vertical Alignment With Div-based LayoutsGetting The First Character Of Array Values, Php ?234

Fairly Used DishWhat Cms Was Used To Make This WebsiteProgramming Contest!