What can I do to get the #factorial div have css properties specified in the header

Black666

New Member
Here is the html document. why doesn't css properties specified in the header execute?what can i do to make them work (properties: "border-radius:4px;background-color:#1B35E0;")\[code\] <!DOCTYPE> <html> <head> <meta charset="UTF-8"> <title>Javascript|Practice</title> <style type="text/css"><!--Here goes inner design with CSS--> #factorial { border-radius:4px; background:yellow; } </style> <script> //Recursion //--------- var x; var factorialValue; function start(){ var startButton=document.getElementById("start"); startButton.addEventListener("click",getInput,false); } function getInput(){ x=window.prompt("Enter a positive integer"); factorialValue=http://stackoverflow.com/questions/15690499/doRecursion(x); displayResult(factorialValue); } function doRecursion(n){ if(n<=1){ return 1; } else return n*doRecursion(n-1); } function displayResult(result){ var output ="<p>"+x+"!="+result+" </p>"; document.getElementById("factorial").innerHTML=output; } window.addEventListener("load",start,false); </script></head> <body> <p>Factorial number Calculator</p> <input id="start" type="button" value="http://stackoverflow.com/questions/15690499/Start" /> <p id="factorial"></p> </body></html>\[/code\]I think I have made all clear I just did not want to bother anyone with to much codes to keep things simpler and ask only the question I had. and I was made to do that because I had an error telling me that "It looks like your post is mostly code please add some more details" I chose to reduce codes instead.
 
Back
Top