1

別の流動幅の非浮動列の隣に適切に配置された、右浮動の流動幅の div があります。

別の流動幅の div をその右フローティング列に配置するまで、すべてが正常に機能します。その時点で、100% に拡張され、非フローティング列がその下にドロップされます。これを修正するために私ができる唯一のことは、問題の原因となっているdivに固定ピクセル幅を与えることですが、親フロートに拡張する必要があるが、それを超えてはならないため、これを行いたくありません。問題の例を次に示します。

    <div style="overflow:hidden;width:800px;">
    <div style="min-width:600px;min-height:200px;float:right;background:#FAA;">
    <div id="floatContent" style="max-width:88%;">Here's some long string of text that makes the width of the parent float expand out to 100% of *its* parent, rather than shrinking the content to its original width (100% minus the width of the non-floated element</div>
  </div>
    <div style="min-width:200px;min-height:200px;background:#CCC;">Some non-floated content</div>
</div>

何か案は?どうもありがとう。

JSFミドルリンク

4

0 に答える 0