반응형
<div id="aa">
<table>~~~</table>
</div>
<script type="text/javascript">
var div_center = document.getElementById("aa");
var div_top = (parseInt(screen.height, 10)/2) - (parseInt(div_center.style.height, 10)/2);
var div_left = (parseInt(screen.width, 10)/2) - (parseInt(div_center.style.width, 10)/2);
var bs_height = document.body.clientHeight;
var bs_width = document.body.clientWidth;
if(bs_width < 1500){ //bs_width : 테이블 너비
document.body.scrollLeft = 750-(bs_width/2);
}
</script>
반응형