I am trying to set the width and height of a div in javascript but it is not being set. I have tried a lot but nothing is working. Here is what i have tried,
<div id="d1">asdasd</div>
<script>
var d = document.getElementById("d1");
d.style.width = "100px";
d.style.height = "100px";
d.style.cssText = 'border:1px solid black;'
</script>
Please check what is the problem!