On Tue, Feb 17, 2009 at 11:29 AM, Michal <[email protected]> wrote:
> On Tue, Feb 17, 2009 at 9:33 AM, ryan <[email protected]> wrote:
>> The CSS works fine when you can set that in advance... but this cant.
>> I'm wrapping the textarea in a div using javascript, so need to be
>> able to get the width through javascript to set it to... which is why
>> i need to find the % width.
>
> But to answer you question. you could access the JS style object directly:
>
> width = myElement.style.width;
>
> This seems to work in Firefox, but I'm unsure about other browsers.
>
> Michal.
>

I've just found: this only works if you set the style directly in the
html tag using the style attribute (which I did in my test). But this
is not a good way of doing things!

Michal.

Reply via email to