これまで私が一度も見たことのない奇妙な問題を抱えています...私たちが知っているように、divはボディの内側にあり、ボディマージン0とパディング0を作ることができますページ全体を高さと幅100%でカバーしています...問題は、体内のdivをマージンしようとすると、体全体が動いてしまいます。私は火か虫を使って身体の上を動かすと驚いていますページ全体ではありません。HTML、本文、divで何か問題があります
<!DOCTYPE HTML>
<html>
<head>
<!-- Styles -->
<link rel="stylesheet" type="text/css" href="styles/general-style.css"/>
<link rel="stylesheet" type="text/css" href="styles/css-buttons.css"/>
<link rel="stylesheet" type="text/css" href="styles/css-colors.css"/>
<!-- Scripts -->
<script type="text/javascript" src="scripts/jquery-1.4.4.min.js"></script>
<script type="text/javascript">
</script>
</head>
<body>
<div id="content"></div>
<div id="footer"> <!-- footer div starts here -->
</div> <!-- footer div starts here -->
</body>
</html>
CSS::ところでこれだけ
html{
}
body{
width: 100%;
height:100%;
padding: 0;
margin: 0;
}
#content{
background: red;
margin-left: auto;
margin-right: auto;
margin-top: 100px
height: 350px
width:350px
}
#footer{
margin-left:auto;
margin-right:auto;
}
#footer-text{
font-size:xx-small;
margin-top:30px;
text-align:center;
}
が '' タグを閉じてお試しください。 – rxgx
@rxgx:これは必須ではありません。 –