Evertjan
Fri May 11 02:49:46 CDT 2007
mayayana wrote on 11 mei 2007 in microsoft.public.scripting.vbscript:
>> Could someone please correct my syntax to set a control to float?
>>
>> MyDivID.style.position="float"
>>
>> I get an error using Office 2003; Win XP; and IE 6.
>>
>> Thanks for your assistance.
[Please do not toppost on usenet]
> Float and position are both CSS properties. In the IE
> DOM float is styleFloat. So you can have
>
> MyDivID.style.position = [absolute | relative | static |fixed | inherit]
> or
> MyDivID.style.styleFloat = [left | right | none]
>
> (I'm not sure whether IE recognizes all 5 position options.)
MyDivID.style.cssFloat
vs
MyDivID.style.styleFloat
The only odd style is float, which is a reserved word in many languages,
including JavaScript. As a result, the float style must be set using
cssFloat in standards compliant browsers, and styleFloat in Internet
Explorer (some standards compliant browsers also provide this as well).
Simply set both of them. It will not cause any problems, and will work in
all possible browsers.
<
http://www.howtocreate.co.uk/tutorials/javascript/domcss>
[the other odd one is .style.className, btw]
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)