Ruby on rails 动态生成的内容不会环绕浮动图像

Ruby on rails 动态生成的内容不会环绕浮动图像,ruby-on-rails,css,ruby,Ruby On Rails,Css,Ruby,当我生成内容时,它不会环绕图像,如果我将其设置为静态,它将环绕图像 静止的 | Image | text text | ..... | text text | ..... | text text | text | text text 动态的 | Image | | | ..... | | | ..... | | | text | text text| | text | text text| <div cl

当我生成内容时,它不会环绕图像,如果我将其设置为静态,它将环绕图像

静止的

 | Image | text text
 | ..... | text text
 | ..... | text text
 | text  | text text
动态的

 | Image |          |
 | ..... |          |
 | ..... |          |
 | text  | text text|
 | text  | text text|


 <div class="somediv">
  <div class="floatbox">
    <%= image_tag 'thumb_1.jpg' %>
  </div>
  <p>
    <%= @posts.first.content %>
  </p>
</div>


 .somediv{
   width: 350px;
   clear: left;
   border: 1px solid gray;
 }

.somediv .floatbox{
  float: left;
}

这是怎么回事,我该如何克服它。

这个愚蠢问题的答案是生成的内容只是一个长字符串,我猜它被解释为一个单词,并导致它溢出。

这个愚蠢问题的答案是生成的内容只是一个长字符串,我猜这是一个词。