align the grid on center
How can I align the grid on center of page ? I tried use the <div align='center'> ... </div> but the grid lost itself...
my code:
<div align="center">
<script>
var grid262= new Active.Controls.Grid;
var css = document.styleSheets[document.styleSheets.length-1];
css.addRule('#grid262', 'ALIGN: CENTER;');
css.addRule('#grid262', 'FONT:MENU;');
css.addRule('#grid262 .active-column-0', 'width:100px; ');
css.addRule('#grid262 .active-column-1', 'text-align:left; width:200px; ');
css.addRule('#grid262 .active-column-2', 'width:100px; ');
css.addRule('#grid262 .active-column-3', 'text-align:right; width:100px; background-color:infobackground; ');
css.addRule('#grid262', 'width:600px');
css.addRule('#grid262', 'height:300px');
grid262.setId('grid262');
var myData = [
["TESTE","<a href = \"http://www.bb.com.br/appbb/portal/index.jsp\"> f3539067</a>","\" Fulvio Longhi\"","Fone: 9680"],
["TESTE","<a href = \"http://www.bb.com.br/appbb/portal/index.jsp\"> f8257952</a>","\" Pedro Pivotto\"","Fone: 6351"],
["TESTE","<a href = \"http://www.bb.com.br/appbb/portal/index.jsp\"> f0000000</a>","\" Maria\"","Fone: 9682"],
["TESTE","<a href = \"http://www.bb.com.br/appbb/portal/index.jsp\"> f1111111</a>","\" Paula\"","Fone: 9683"]];
grid262.setDataText(function(i, j){return myData[i][j]});
grid262. setColumnCount(4);
grid262. setRowCount(4);
bbColumnsLabel = ["Random","Matricula","Nome","Fone"];
grid262.setColumnText(function(i){return bbColumnsLabel[i]});
grid262.sort(2,'ascending');
document.write(grid262);
</script>
testes
</div>
my code:
<div align="center">
<script>
var grid262= new Active.Controls.Grid;
var css = document.styleSheets[document.styleSheets.length-1];
css.addRule('#grid262', 'ALIGN: CENTER;');
css.addRule('#grid262', 'FONT:MENU;');
css.addRule('#grid262 .active-column-0', 'width:100px; ');
css.addRule('#grid262 .active-column-1', 'text-align:left; width:200px; ');
css.addRule('#grid262 .active-column-2', 'width:100px; ');
css.addRule('#grid262 .active-column-3', 'text-align:right; width:100px; background-color:infobackground; ');
css.addRule('#grid262', 'width:600px');
css.addRule('#grid262', 'height:300px');
grid262.setId('grid262');
var myData = [
["TESTE","<a href = \"http://www.bb.com.br/appbb/portal/index.jsp\"> f3539067</a>","\" Fulvio Longhi\"","Fone: 9680"],
["TESTE","<a href = \"http://www.bb.com.br/appbb/portal/index.jsp\"> f8257952</a>","\" Pedro Pivotto\"","Fone: 6351"],
["TESTE","<a href = \"http://www.bb.com.br/appbb/portal/index.jsp\"> f0000000</a>","\" Maria\"","Fone: 9682"],
["TESTE","<a href = \"http://www.bb.com.br/appbb/portal/index.jsp\"> f1111111</a>","\" Paula\"","Fone: 9683"]];
grid262.setDataText(function(i, j){return myData[i][j]});
grid262. setColumnCount(4);
grid262. setRowCount(4);
bbColumnsLabel = ["Random","Matricula","Nome","Fone"];
grid262.setColumnText(function(i){return bbColumnsLabel[i]});
grid262.sort(2,'ascending');
document.write(grid262);
</script>
testes
</div>
Longhi (Brasil)
April 12,