setting a whole style string to an element from javascript (not individual style parameters)

How about the .style.cssText property? Here’s Microsoft’s explanation.

Throw it the styles you’d like to apply like so:

document.getElementById('myEl').style.cssText="float:left;margin-top:75px;";

As for browser support, although it was IE-proprietary I believe it’s well-supported (works in the IEs, FF3, and Safari 3.2 WIN at least).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)