HTML構造を変更せずに:
<div id="container">
<header>
<h1>This is the Heading Which May be Long and Span Lines</h1>
</header>
<section>
<div class="thumb">
<img></img>
</div>
<div class="content">
<p>Content</p>
<p>continues</p>
<p>and wraps around the thumb</p>
</div>
</section>
</div>
img.thumb
フロートが左に、header h1
ハングが右にぶら下がって、線を折り返すように、これをスタイリングする必要があります。はh1
左寄せする必要があります:
+------------+ Heading Text which May Be Long and
| | Thus would Span Lines
| thumb |
| | Content
+------------+ continues
and wraps around the thumb.
レイアウト(つまり、見出しとコンテンツの幅)は、コンテナの幅に流動的に適応する必要があります。(親指は固定幅です。)
要素の順序を変更せずにCSS3でこれを達成する方法はありますか?右の列の幅を固定することでこれを行うことができますが、「フロートの右側の残りのスペースを幅として使用する」を指定する方法はありますか?(javascriptなし、lessなど)
ここでフィドル:http://jsfiddle.net/agRx3/1/