Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by seblondres

  1. Hi guys,I've created this new element below. I managed to change the margin on the left, but I still cannot get rid off the top and bottom margin of the new element created, I've tried marginTop:0px but it doesn't work. Any suggestions?Thanks for your help.var p = document.getElementsByTagName("P").item(4);var newText = document.createTextNode("Print");var newElement = document.createElement('a'); newElement.setAttribute('href', 'http://www.google.fr'); newElement.setAttribute('style','margin-left:25px;'); newElement.appendChild(newText);p.parentNode.appendChild(newElement);
  • Create New...