When I generate content it will not wrap arround the image, if I make it static it will wrap
(static)
| Image | text text
| ..... | text text
| ..... | text text
| text | text text
(dynamic)
| 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;
}
howcome this is the beaviour, and how do I overcome it.
The answare to this stupid question is that the generated content were just one long string, which I guess was interpeted as one word, and caused it to overflow.