I have a CSS div defined as follows :
<div id="col-2" >
In some circumstances I want to change its width.
I have tried all the following within a javascript function:
document.getEle mentById("col-2").width= "900";
document.getEle mentById("col-2").resizeTo(90 0, 520);
document.getEle mentById("col-2").width.value = "900";
document.all.co l-2.resizeTo(900, 520);
document.layers["col-2"].resizeTo(900, 520);
None of which have worked.
Within the stylesheet I initially had col-2 defined as an ID. Clutching at
straws I changed it to a class but that made no difference.
Can someone point out the right way to do it?
Thanks
Orson
<div id="col-2" >
In some circumstances I want to change its width.
I have tried all the following within a javascript function:
document.getEle mentById("col-2").width= "900";
document.getEle mentById("col-2").resizeTo(90 0, 520);
document.getEle mentById("col-2").width.value = "900";
document.all.co l-2.resizeTo(900, 520);
document.layers["col-2"].resizeTo(900, 520);
None of which have worked.
Within the stylesheet I initially had col-2 defined as an ID. Clutching at
straws I changed it to a class but that made no difference.
Can someone point out the right way to do it?
Thanks
Orson
Comment