7

あるdivが別のdivの下にラップするのを防ぐにはどうすればよいですか?具体的には、ブラウザの幅が2番目のdivの内容を折り返すようにサイズ変更されている場合でも、2番目のdivを常に1番目のdivの右側に配置する必要があります。

私は常にdivを並べて欲しいです: 私はこれをdivが常に並んでいることを望みます

また、ブラウザウィンドウのサイズが変更されて、2番目のdivの内容が折り返される必要がある場合でも、このように表示されることはありません。
そして、最初のdivの下に2番目のdivをラップさせないでください

<!DOCTYPE html>
<html lang="en">
  <body>
    <div class="columns">
      <div style="background-color: #990000; width:70px; float: left">
        Pic
      </div>
      <div style="background-color: #00FF00; float: left; " >
      body some interesting large amount of content. some interesting large amount of content.
      </div>    
    </div>
  </body>
</html>
4

1 に答える 1

6
<div class="columns">
  <div style="background-color: #990000; width:70px; float: left">
      Pic
  </div>
  <div style="background-color: #00FF00; margin-left: 70px;" >
      body some interesting large amount of content. some interesting large amount of content.
  </div>    
</div>

例: http://jsfiddle.net/arPzt/

于 2013-02-25T07:07:47.193 に答える