View Full Version : getting ACTUAL width of a select box
03-22-2007, 03:48 PM
is there any way to find out what the "physical" width of a select is. o.style.width only returns the value set with css, i would like to know what width occures when you don't set a style (ie. allow the browser to size based on content)
is this possible?
03-22-2007, 11:18 PM
03-22-2007, 11:32 PM
I think it might be outside the style object like
although I've never used it myself. It could be browser dependent too I suppose.
03-26-2007, 06:50 PM
Kor is right offsetWidth isn't a style attribute.. (Thanks for catching that Kor :))...offsetWidth is supported by both IE and mozilla http://www.quirksmode.org/dom/getstyles.html
06-15-2007, 05:30 PM
i forgot to answer this...
thanks all, it worked out fine :-D
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.