うーん。クライアント ウィンドウのサイズを変更することはできません。
あなたができることの1つは、親divの幅をに設定する左スクロールを避けることです1000px
<div id="parent" style="min-width:1000px;">
<div id="container" style="position:absolute; top:0px; left:50%;
margin-left:-500px; width:1000px;"></div>
</div>
注:
html と body タグの幅をmin-width=100%
更新しました:
<html style="min-width: 100%; background-color:Gray;">
<body style="min-width: 100%; background-color:White;">
<div id="parent" style="min-width: 1000px; position:relative;">
<div id="container" style="position: absolute; top: 0px; left: 50%; margin-left: -500px;
width: 1000px; border: 1px solid red; height: 10px;">
1 2 3 4 5
</div>
</div>
</body>
</html>
記載漏れposition:relative
ました。このコードは機能しています。