i kind of new ruby , installed refile gem upload multiple photos. wanted display them in carousel format using bootstrap carousel. when displayed photo doesn't fill carousel window , sticks left. leaves rest of carousel window blank scrolling arrow off picture. way displaying https://www.shyftworks.com/ambassadors/elise-craig not sure do. here fiddle https://jsfiddle.net/farquhar86/3vy2547f/ code on show page:
<!-- wrapper slides --> <div class="carousel-inner"> <% @ambassador.images.each_with_index |image, index| %> <div class="item <%= 'active' if index == 0%>" data-slide-number="<%= index %>"> <%=attachment_image_tag(image, :file, :fill, 600, 600, class: 'img-responsive') %> </div> <% end%> </div> <!-- controls --> <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> <span class="sr-only">previous</span> </a> <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"> <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> <span class="sr-only">next</span> </a> </div> <!-- end of carousel-->
any appreciated. if have better way accomplish trying awesome!!!
set .profile .main-section .content {width: 60%}
or so. because have photos of different widths, want use value width
container accommodate various photo widths presents them reasonably consistently.
you don't want container change sizes each photo because make controls (left-right arrows) jump user, why folks made carousel opted (rightly) keep dimensions of .content
div consistent regardless of photo size.
so other option here crop photos same width. opt cropping photos standardized dimensions because add photos carousel, may find compromise width
value tough find.
Comments
Post a Comment