Javascript examples for CSS Style Property:marginBottom
Change the bottom margin of a <div> element back to "normal":
<!DOCTYPE html> <html> <head> <style> #myDiv {// w ww . j ava2 s .com border: 1px solid #FF0000; margin-bottom: 75px; } </style> </head> <body> <div id="myDiv">This is a div.</div> <br> <button type="button" onclick="myFunction()">Change bottom margin</button> <script> function myFunction() { document.getElementById("myDiv").style.marginBottom = "0px"; } </script> </body> </html>