Jump to content

match height


mwbarry

Recommended Posts

I am trying to write a script similar to this one: http://w3schools.invisionzone.com/index.php?showtopic=42074that will make the minimum height of a content box 16px less than that of a sidebar. When I run this script I get an error message in the console that says "Uncaught TypeError: Cannot read property 'style' of null" Here is the script:

<script type="text/javascript">function contentheight() {  var sideheight = document.getElementById('ja-col1');  var sideitem = sideheight.offsetHeight;   document.getElementById('ja-content-inner').style.minHeight = sideitem - 16 + "px";}</script>

Any idea what I am doing wrong?

Link to comment
Share on other sites

in other words, double check the reference you are assuming of this statement

 document.getElementById('ja-content-inner').style.minHeight

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...