Getting The Height Of A Div - Webmasters - Nairaland
Nairaland Forum › Science/Technology › Webmasters › Getting The Height Of A Div (682 Views)
| 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 ![]() But, i visited the link you dropped and i saw ow they achieved it: document.defaultView.getComputedStyle(docObj, "" .getPropertyValue("height" // non iedocument.getElementById(theElt).offsetHeight // ie thanks house @DC, ![]() |
| Re: Getting The Height Of A Div by DualCore1: 5:14pm On Jun 08, 2010 |
![]() |
| 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: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: ![]() |
Importance Of Div Tags • How To Do Vertical Alignment With Div-based Layouts • Getting The First Character Of Array Values, Php ? • 2 • 3 • 4
Fairly Used Dish • What Cms Was Used To Make This Website • Programming Contest!

.getPropertyValue("height"

