Javascript examples for CSS Style Property:cssText
Syntax to include CSS multi property and set CSS style text
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from www. ja v a 2 s. c o m*/ document.getElementById("margin").style.backgroundColor = "green"; document.getElementById("margin").style.cssText += "margin-left: -280px; min-width: 550px;"; } </script> </head> <body> <div id="margin"> asdf </div> </body> </html>