I have a few buttons that were made though a loop in javasript.
    var docFrag = document.createDocumentFragment();
    for (var i=0; i < 9 ; i++){ 
        var row = document.createElement("tr") 
        for (var j=0; j < 9 ; j++){ 
                var elem = document.createElement('input');
                elem.class = 'gumb';
                elem.style.color = 'purple';
                elem.type = 'button';
                elem.id = 'r'+i+'s'+j;
                elem.value = '';
                elem.innerHTML = elem.value; 
                docFrag.appendChild(elem); 
            } 
        document.body.appendChild(docFrag); 
        document.body.appendChild(row); 
    } 
And I want to apply css to them, but nothing seems to work. I tried it using elem.style and through a special style.css file using the button's class but it doesn't work and I don't know why.