2010-12-11 7 views
0

leftPanelという浮動要素を常に保持したいと思います。HTML/CSS:要素がすべて浮かんでいる

高さを指定したくありません。

どうすればいいですか?

例:

|floated element |  main content here 
|floated   |  text is here and the 
| stops   |  floated content <- 
| here   |  keeps following until 
|    |  main content also ends 
|    |  main content here 
|    |  main content here 
|    |  main content here 
|    |  main content here 
|    |  main content here 
|    |  main content here 
|    |  ends here, and it also ends here. 

現在、それは次のようになります。

|floated element |  main content here 
    |stops   |  main content here 
    |here   |  main content here 
main content here 
main content here 

http://jsfiddle.net/my5Aj/

はどのようにそれを固定することができますか?

答えて

0

divに適切なコンテンツを入力するだけで、widthfloat: right;と設定します。

0

浮遊要素の幅の余白が左側に表示されます。

関連する問題