# cesium funny behavior

**URL:** <https://community.cesium.com/t/cesium-funny-behavior/1657>\
**Category:** CesiumJS\
**Created:** [November 9, 2014, 10:37pm UTC](https://community.cesium.com/t/cesium-funny-behavior/1657 "2014-11-09T22:37:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sean\_con](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@sean\_con](https://community.cesium.com/u/sean_con)\
**Post date:** [November 9, 2014, 10:37pm UTC](https://community.cesium.com/t/cesium-funny-behavior/1657/1 "2014-11-09T22:37:02Z")

</div>

I have this dynamically generated by a javascript :

var t = document.getElementById(\"outcell\");  
// outcell is a \<td\>,  
//it is correctl defined

var div = document.createElement('div');  
t.appendChild(div);

div.id='cesiumContainer1';  
div.style.border = '2px solid white';  
div.width = '98%';  
div.padding = '4px';  
div.margin = '4px'; // viewer injected .....

Thus, I am dynamically generating a div ...

Now, a php script is writing this to after the javascript, before the loading of course :

$cn = 1;  
echo "var map".$cn." = new Cesium.CesiumWidget('cesiumContainer".$cn."', {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sceneMode : Cesium.SceneMode.SCENE3D  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});\n"; // container, and viewmode  
echo "var scene".$cn." = map".$cn.".scene;\n"; // scene injected  
&nbsp;&nbsp;&nbsp;&nbsp;  
echo "var terrainProvider".$cn." = // etc

Everything is fine, but the div size seems to be increasing as loading progresses.... That is, the widget is growing by itself

What am i doing wrong? could not get any error in firefox js console.
