CSSのうち、floatされたボックスはそれが属する親の大きさを超えて表示される。裏を返せば、親の大きさが無効となり意図しない結果を招く。
親を閉じる前にclear: both; のダミーを挿入するclearfixという方法が回避の王道だとか。私はoverflow: auto; を親につけてやる後者のサイトの方法を採用。
See: http://archiva.jp/web/html-css/clearfix.html and http://redline.hippy.jp/lab/css/floatoverflow.php
This page was produced by Jun INABA. HTML convert time: 0.417 sec. TOP of this page.
j-inb.net is proudly powered by WordPress 3.3.1. © Jun INABA, all rights reserved.