タグ

関連タグで絞り込む (2)

タグの絞り込みを解除

clearfixに関するh6nのブックマーク (2)

  • float解除の決定版。clearfixを考えたら、進化した。

    現在この中でclearfixでよく使用されているプロパティは display:inline-block; height:1%(min-height:1%) zoom:1; でも良く考えたら、全て微妙です。 zoom:1はIEの独自仕様ですし、heightを使用する場合は、IE6,7に対応させるために2つのプロパティが必要です。 display:inline-blockもボックスの要素を変形させることになります。 hasLayoutのスイッチを見た時に、一番理に適ったプロパティはwidthかなと思いました。 子要素を囲む要素として、divやulなどデフォルトCSSがdisplay:blockのプロパティのものが多く、display:blockのプロパティの場合、width:100%で問題ないと思ったからです。 現在のブラウザ状況に適したclearfix 上記を踏まえ見直したclearfixが

    float解除の決定版。clearfixを考えたら、進化した。
  • What methods of ‘clearfix’ can I use?

    I have the age-old problem of a div wrapping a two-column layout. My sidebar is floated, so my container div fails to wrap the content and sidebar. <div id="container"> <div id="content"></div> <div id="sidebar"></div> </div> There seem to be numerous methods of fixing the clear bug in Firefox: <br clear="all"/> overflow:auto overflow:hidden In my situation, the only one that seems to work correct

    What methods of ‘clearfix’ can I use?
  • 1