'Add to Cart' button fails using 'Display: inline' in in Agile Web Development with Rails (4th edition) -
i cannot make 'add cart' button inline next product price, reason not understand, button appears below product price.
here development settings:
ruby 1.9.3p392
rails 4.0.0.rc2
i following depot project , stuck in iteration d3 author insert button next product price through following css code:
#store .entry form, #store .entry form div { display: inline; }
and views/store/index.html.erb follow:
<% if notice %> <p id="notice"><%= notice %></p> <% end %> <h1>your pragmatic catalog</h1> <% @products.each |product| %> <div class="entry"> <%= image_tag(product.image_url) %> <h3><%= product.title %></h3> <%= sanitize(product.description) %> <div class="price_line"> <span class="price"><%= number_to_currency(product.price) %></span> <%= button_to 'add cart' , line_items_path(:product_id => product) %> </div> </div> <% end %>
also have reviewing html rendered google chrome:
<div class="price_line"> <span class="price">$34.95</span> <form action="/line_items?product_id=4" class="button_to" method="post"> <div><input type="submit" value="add cart" /><input name="authenticity_token" type="hidden" value="ytcdgb4x1h98dxni0dqqhv4hjfqdusbpmwslll3gehw=" /> </div></form> </div>
i have tested on google chrome, firefox, ie9 , opera. seems not problem related browser. need can explain weird behavior smartest way solve it. :-)
thanks in advance input.
Comments
Post a Comment