Antarr Byrd
Antarr Byrd

Reputation: 26091

How can I wrap text around a partial

I'm trying to wrap the text from a post around a partial, which renders a but is seems the best i can do is get it to do is align right. Any ideas?

<%= render "shared/slider" %>
<%= render "shared/calender" %>
<div id="post-1">
<b><%= @post.first.title %></b>
<%= simple_format(@post.first().content) %>
</div>
<script>
  #post-1
  {
    align: right;
  }
</script>

Upvotes: 0

Views: 165

Answers (1)

Wex
Wex

Reputation: 15695

Try using the CSS property float.

I created a quick demo that shows that applying float: left to the element you are trying to wrap the text around will achieve your desired effect.

Preview: http://jsfiddle.net/Wexcode/MN5BS/

Upvotes: 1

Related Questions