HTML and CSS Reference
In-Depth Information
e Mystery Of e CSS Float Property - Part II
Changing the Float Property with JavaScript
To change a CSS value in JavaScript, you would access the style object,
converting the intended CSS property to “camel case”. For example, the
CSS property “margin-left” becomes marginLeft ; the property
background-color becomes backgroundColor , and so on. But with
the float property, it's di " erent, because float is already a reserved
word in JavaScript. So, the following would be incorrect: = "left";
Instead, you would use one of the following:
// For Internet Explorer = "left";
// For all other browsers = "left";
Search WWH ::

Custom Search