なぜマージントップを使用しているときにクリアを使用しないのですか?この場合、なぜクリアは適用されませんか?
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
#t1{float:left;border:#000 thin groove;width:200px;}
#t3{float:left;border:#000 thin groove;width:200px;clear:both;margin-top:-40px;}
</style>
</head>
<body>
<p id="t1">This is child 1</p>
<p id="t3">This is child 3</p>
</body>
</html>
IE8とMozilla Firefox 4では動作しません –
あなたはどんな問題を抱えていますか?私たち全員にうまく見えます。 – jchavannes
クリアを使用していますが、両方の要素が重なっています。 –