# Element height help

**URL:** <https://forum.kirupa.com/t/element-height-help/267455>\
**Category:** Uncategorized\
**Created:** [August 1, 2008, 9:04am UTC](https://forum.kirupa.com/t/element-height-help/267455 "2008-08-01T09:04:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brndn](https://avatars.discourse-cdn.com/v4/letter/b/dec6dc/32.png) [@brndn](https://forum.kirupa.com/u/brndn)\
**Post date:** [August 1, 2008, 9:04am UTC](https://forum.kirupa.com/t/element-height-help/267455/1 "2008-08-01T09:04:37Z")

</div>

hi there  
I am trying to get the following elements to display a height that is the same as the parent container.

var divHeight = ((document.getElementById(‘content’).offsetHeight) + ‘px’)  
alert(divHeight);  
document.getElementById(‘col1’).style.height = divHeight;  
document.getElementById(‘col2’).style.height = divHeight;  
document.getElementById(‘col3’).style.height = divHeight;  
\</script\>

unfortunately divHeight has no value. it relies on the content that is inside it.

if that makes sense??

any help much apreciated.

cheers
