Java Notes From My Desktop

Tags - Categories : All | Articles | Book Reviews | CSS | Java | Javaranch | Javascript | News | Opengl | Opinions | Personal | php

I found out the hard way today that in order to set the float style for an element in javascript, you can't use:

element.style.float

because float is a reserved word, bla bla. Fine and dandy. So I look up what I need to use instead. Found the standards way:

element.style.cssFloat

But wait...It doesn't work in IE. In IE I have to use their type:

element.style.styleFloat

IE is such a POS. Anyway, thought I might save someone else from having to dig around for it.


Well put. I just spent a couple hours digging around trying to figure out a similar problem. Many thanks for doing just what you mentioned... it helped greatly.
Thank you. I got the info about "float" and "cssFloat" elsewhere, but yours added the much-needed IE-only info.
Thanks for the tip. Found it in Google right away. Just knew there something screwy with IE.
...i spent several hours to hunt this property problem, even sites like http://www.w3schools.com/htmldom/dom_obj_style.asp missed this information. Big Thanks!
Thank you :) It helped a lot. And also thanks for Google to find this page.
Wow, what a bunch of crap from MSIE. Microsoft needs to get on that, seriously now... I suppose in the meantime you could make separate classes in your CSS, for instance .floatRight { float: right; } .floatLeft { float: left; } and use javascript to change the classes. That should work even in primitive browsers like IE.
Thank you, you saved me!
Thank a lot
creole restaurant erie pennsylvania start page

Read more...
passion flower plant introduction

Read more...
Actual articles about schools in nc and more.

Read more...
la musica della mafia author

Read more...


Add a comment

Title
Body
HTML : b, i, blockquote, br, p, pre, a href="", ul, ol, li
Math Quiz 2 + 8 = (Helps stop blog spam)
Name
E-mail address
Website
Remember me Yes  No 

E-mail addresses are not publicly displayed, so please only leave your e-mail address if you would like to be notified when new comments are added to this blog entry (you can opt-out later).