0

How might I add CSS to this:

<h9>Sunday</h9>
    <% @sunday.each do |chorelist| %><br>
    <p2><%= chorelist.name %></p2>
    <%= button_to "Delete", chorelists_destroy_path(id: chorelist.id), 
        class:"btn btn-space" %>
    <% end %>

I'm not sure where I could add a div class or button class. (I'm still relatively new to Rails.)

Thanks!

Justin
  • 7
  • 3
  • 4
    Possible duplicate of [Rails button\_to - applying css class to button](http://stackoverflow.com/questions/14123884/rails-button-to-applying-css-class-to-button) – jamesjaya Nov 10 '16 at 02:26
  • what you try to implement in it? – uzaif Nov 10 '16 at 04:55
  • you may want to try inspecting the button in your browser to see what are the elements of the button that you can access with CSS – angkiki Nov 10 '16 at 07:02

1 Answers1

0

Use something like this in your_file.html.erb ,

<style>
  // do ur styling.
</style>

Or under assets/stylesheet add new file your_file.css write style in it and don't forget to include this file in application.css

Hassan Munir
  • 419
  • 7
  • 24