[thelist] floating with javascript
joe
stowaway at uklinux.net
Thu Apr 22 16:01:24 CDT 2004
Hi Douglas
for any attributes that you can't access using:
whateverNode.style.attribute = value
(eg this doesn't work with float but will work with attributes like
padding etc) - you should be able to use:
whateverNode.setAttribute("style", "attribute: value");
hth
joe
Douglas Livingstone wrote:
>
> I want to float a div using javascript. (as in the CSS: float: right;
> ) I found the code to do this in IE over at MSDN:
>
> this.parentNode.style.styleFloat = 'right';
>
> Works like a charm. Where can I look this sort of stuff up for
> Moz/Opera/Safari?
>
> I'd like to set other CSS properties like clear, padding, margins and
> so on.
More information about the thelist
mailing list