I don't know why buy javascript say my div is null.
this the javascript code:
var box = document.getElementById("box");
box.style.height= box.innerText;
and this is the HTML:
<html>
<head>
<link rel="stylesheet" type="text/css" href="classStyle.css">
</head>
</head>
<body onmousemove="search()">
<script src="java.js"></script>
<center>
<div id="header">Fantasy class</div>
<div id="box">50%</div>
<div type=buttom> יצירת ליגה</div>
</center>
</body>
</html>