Please could someone help with a column resizing issue?

Hi,

I’m very much a novice with scripting, and I’m trying to resize a column’s length to match the main content column.

After much playing, I’ve come up with this:



function matchHeight(){
    var bigColumnHeight=document.getElementById('content_topBG').offsetHeight;
    newHeight=(bigColumnHeight-750);
    document.getElementById('sideBG').style.height=newHeight;   
}

The function is called on load.

The first line works fine, but it’s not assigning the value to the height of “sideBG”.

Please could somebody explain why this doesn’t work?

Thanks,
Andy

If it helps, the CSS is:

#content_topBG {
    background: #000000 url('images/characterBG.jpg') top no-repeat;
    float:right;
    width: 648px;
    margin:20px 0 0 0;
    padding: 10px 0 0 0;
    border: 1px solid #330000;
}
#sideBG {
    float:left;
    width:250px;
    background: #000000 url(images/sideBG01.jpg) no-repeat top left;
    /*height:auto;*/
}