...

View Full Version : Width Arrtibute On a DIV



Elcid32
07-25-2006, 07:01 PM
Hello Again Forum:

I have the following code:



var tablewidth=430;
hdr= createElement('div');
hdr.className="hdrdivclass";
hdr.width= tablewidth;


When executed, the width is seemingly ignored. What is the poper method for setting this property? Thanks.

glenngv
07-25-2006, 09:08 PM
hdr.style.width = tablewidth + "px";

Elcid32
07-26-2006, 04:35 PM
This worked perfectly - thank you very much.

Shawn



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum