var element = document.getElementById('sample_id'); element.style.width = null; element.style.height = null;