Henrietta Read Henrietta Read - 2 years ago 101
HTML Question

How to center KineticJS stage in webpage

Trying to center a KineticJS stage in webpage.


<div style="text-align: center">
<div id="container"></div>

but it centers on the left side of stage, no the middle of the stage. what am I missing?

Answer Source
  <div id="container" style="width:600px;border:1px solid gray;margin:auto;height:200px;"></div>

margin:auto can align this div center

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download