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