I have this code, and just want to center the image objects being displayed from my arrays.
And in the CSS I have:
Just not sure how it works...or what it should look like..
Thanks Guys!
PHP Code
<?php
function redeal(){
var centered = document.createElement('div');
centered.className = 'centered';
for(x=0;x<playerarray.length;x++){
document.body.appendChild(playerarray[x].image);
}
document.body.appendChild(layer); //this just adds a 'br', declared globally
for (x=0;x<opponentarray.length;x++) {
document.body.appendChild(opponentarray[x].image);
}
}
And in the CSS I have:
PHP Code
<?php
.centered {display: block; margin-left: auto; width: 500px; margin-right: auto }
Just not sure how it works...or what it should look like..
Thanks Guys!
