CSSフロートが私を夢中にしています。再現する方法CSSフロートの説明
は:clear:both
なしで動作しない理由だけ
http://www.w3schools.com/css/tryit.asp?filename=trycss_float_clear
から次のコードスニペットをコピー?
<html>
<head>
<style type="text/css">
.thumbnail
{
float:left;
width:110px;
height:90px;
margin:5px;
}
.text_line
{
display:block;
height:90px;
width:300px;
margin:0px;
background-color:red;
}
</style>
</head>
<body style="display:block">
<h3>Image Gallery</h3>
<p>Try resizing the window to see what happens when the images does not have enough room.</p>
<img class="thumbnail" src="klematis_small.jpg" width="107" height="90">
<img class="thumbnail" src="klematis2_small.jpg" width="107" height="80">
<img class="thumbnail" src="klematis3_small.jpg" width="116" height="90">
<img class="thumbnail" src="klematis4_small.jpg" width="120" height="90">
<p class="text_line">a</p>
<img class="thumbnail" src="klematis_small.jpg" width="107" height="90">
<img class="thumbnail" src="klematis2_small.jpg" width="107" height="80">
<img class="thumbnail" src="klematis3_small.jpg" width="116" height="90">
<img class="thumbnail" src="klematis4_small.jpg" width="120" height="90">
</body>
</html>
期待どおりに動作するようです。あなたは問題が何であり、何を正確に達成しようとしているのか説明できますか? – Nix
私には、あなたが何かを取り除いたことが本当に奇妙なようです( 'clear:both;')。そして、あなたはw3schoolの例のように動作しないのだろうかと思います。あなたが何かを削除したり交換したりすると、作業が中断されます。もしあなたがそれを元に戻す可能性があります。 – Joonas
[w3schoolsは悪い](http://w3fools.com)、[floatutorial](http://css.maxdesign.com.au/floatutorial/)は、おそらくより良いリソースです。浮き沈みについて学ぶ。 – You