1

I am having trouble aligning my caption to the right of my image within a bootstrap thumbnail

My HTML

  <div class="container">
   <div class="row">
    <div class="span8 offset2">
     <% @response.each do |f| %>
     <% f.each_pair do |k, v| %>
     <h3 class="smallTitle">Available on&nbsp;<%= k %></h2>
      <% v.each do |film| %>

     <div class="thumbnail">
      <img src="http://placehold.it/180x200">
       <div class="caption">
        <%= link_to film[1], film[0] %> : <%= link_to "remind me", "#", :class => 'remind' %>
       </div>
      </div>
     <% end %>
    <% end %>
   <% end %>
  </div>
 </div><!--Row-->
</div><!--/container-->

So at the moment my image is to the left and the caption is below the image.. Is there a simple way with css to get the caption to div to sit to the right of the image

Richlewis
  • 15,070
  • 37
  • 122
  • 283

1 Answers1

6

You could just float the image and caption within the thumbnail div

 <div class="thumbnail clearfix">
  <img src="http://placehold.it/180x200" class="pull-left">
   <div class="caption" class="pull-right">
    <%= link_to film[1], film[0] %> : <%= link_to "remind me", "#", :class => 'remind' %>
   </div>
  </div>
Brian
  • 4,328
  • 13
  • 58
  • 103