1

I would like to have a centered O3D canvas. Can anyone suggest how I might do this?

Mike2012
  • 7,629
  • 15
  • 84
  • 135

1 Answers1

1

Instead of writing:

<div id="o3d" style="width: 600px; height: 600px;"></div>

You write:

<div id="o3d" style="width: 600px; height: 600px; margin:0 auto;"></div>

O3D inserts itself into the div's that have id's starting with "o3d". Any styling that you apply to the div, is essentially applied to the O3D object. margin:0 auto; just means that you want 0 vertical margin and you want balanced horizontal margin.

ornerylawn
  • 524
  • 1
  • 4
  • 9