Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,200,028 members, 7,973,510 topics. Date: Saturday, 12 October 2024 at 06:04 PM

Getting The Height Of A Div - Webmasters - Nairaland

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

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

(1) (Reply) (Go Down)

Getting The Height Of A Div by ogzille(m): 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(m): 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(m): 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)

Request For Software S / Cheap Web Hosting With Free Domain For Life / Submit Your Site Here To Multiple Networks

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 7
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.