Javascript examples for CSS Style Property:marginLeft
Set marginLeft CSS style property
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #s4-ca {/*from www . ja v a 2 s. c o m*/ margin-left: 100px; } </style> </head> <body> <div id="s4-ca"> Foo </div> <script type="text/javascript"> document.getElementById('s4-ca').style.marginLeft = '0px'; </script> </body> </html>