Skip to content

Instantly share code, notes, and snippets.

@harrisonmalone
Last active November 1, 2018 12:00
Show Gist options
  • Save harrisonmalone/4522c1d0b29716801dfb475c85648c6b to your computer and use it in GitHub Desktop.
Save harrisonmalone/4522c1d0b29716801dfb475c85648c6b to your computer and use it in GitHub Desktop.
<div class="container">
<%= form_for @album, url: albums_path, html: {class: "nifty-form"} do |f| %>
<%= f.label :name %>
<%= f.text_field :name %>
<%= f.submit "Create" %>
<% end %>
</div>
.container {
max-width: 600px;
margin: 0 auto;
}
.nifty-form label {
font-size: 15px;
font-family: sans-serif;
}
.nifty-form input[type=text] {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
font-size: 16px;
}
.nifty-form input:focus {
border: 1px solid grey;
}
.nifty-form input[type=submit] {
width: 100%;
background-color: blueviolet;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment