0

i try to add class in javascript to div, but it doesnt work. Here's the div where I want to add class on it:

postimage.style.container = {"margin-bottom": "0.5em", "margin-top": "0.5em"};

I try to container.className += ' additionalClass'; or container_div.setAttribute('class',"classname") but it doesn't work

I tried this, bu it doesn't work for me Change an element's class with JavaScript

Penny
  • 11
  • 2

0 Answers0