<div id="center" style="width: 200px; height: 200px;"></div>
<script>
function qwe(){
var container = document.getElementById("center");
var coll = 5;
var width = container.clientWidth/coll;
var height = container.clientHeight/coll;
for (var i = 0; i<coll;i++){
for (var j =0; j<coll;j++){
var sp = document.createElement("span");
sp.style.border="1px solid #FF00AE";
sp.style.display = 'inline-block';
sp.style.width = (width - 2) +"px";
sp.style.height = (height - 2) +"px";
container.appendChild(sp);
}
}
}
qwe();
</script>