私は次のコードを持っています:
<!DOCTYPE html>
<html>
<head>
<title>Home page</title>
<style type="text/css">
.mydiv {
width:300px;float:left;background-color:#ff0000;height:250px;margin-right:10px
}
</style>
</head>
<body>
<div style="margin-left:auto;margin-right:auto;width:1000px;clear:both">
<div style="margin-right:auto;margin-left:auto;text-align:center;margin-top:5px;">This is the title</div>
</div>
<div style="margin-right:auto;margin-left:auto;clear:both;width:1000px;margin-top:10px">
<div class="mydiv">Div</div>
<div class="mydiv">Div</div>
<div class="mydiv">Div</div>
</div>
</body>
</html>
問題は、2番目と3番目のdivが最初のdivと(水平方向に)適切に位置合わせされていないことです。いくつかの理由で、垂直オフセットにより、2番目と3番目のdivが最初のdivより少し低く表示されます。どうしてこれなの?
ありがとうございました
PS
私はMacOSXでChrome25を使用しています。それが何らかの形で役立つことを願っています。