HELOコマンド本部はただ文句を言わない私は私のHTML & CSSで起こっていくつかの奇妙なものを持っている
を中心に取得し、私は水平に彼らの親要素の内側中央に表示されるべき2つのネストされたdivを持っているが、それらは左側に配置されています代わりに。
私は間違っていますか?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/homepage.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
<!--
html, body, div, form, fieldset, legend, label, img { margin: 0; padding: 0; } table { border-collapse: collapse; border-spacing: 0; } th, td { text-align: left; } h1, h2, h3, h4, h5, h6, th, td, caption { font-weight:normal; } img { border: 0; }
html, body { height: 100%; width: 100%; }
body { background-color: RGB(255, 255, 255); margin: 20px; text-align: center; }
#outerContainer { background-color: #DCFF9A; height: 100%; width: 100%; }
#header { width: 30%; height: 180px; background-color: blue; }
#main { width: 1200px; height: 60%; background-color: red; }
-->
</style>
<script type="text/javascript">
<!--
-->
</script>
</head>
<body>
<div id="outerContainer">
<div id="header">
</div>
<br/>
<div id="main">
</div>
</div>
</body>
</html>
実際に以下のスティーブも追加0からマージン:0 auto;私は彼の方が良いと思う。 – sybohy