Rails doesn't use CSS frameworks such as bootstrap, and I can't find any plain code, so that memo
There is a Reception model, the columns are names and purposes.
Write such a simple form simply using only HTML and CSS
HTML
html
<%= form_with model: @reception do |f| %>
<ul>
<li>
<%= f.label :name, "name" %>
</li>
<li>
<%= f.text_field :name, placeholder: "Please enter your name" %>
</li>
<li>
<%= f.label :purpose, "Please select your request" %>
</li>
<li>
<%= f.select :purpose,
(
[
["For an interview", 'interview'],
["For an interview", 'interview'],
["For a meeting", 'meeting'],
["Other", 'Other']
]
), {}, size: "4"
%>
</li>
<li>
<%= f.submit 'Send' %>
</li>
</ul>
<% end %>
CSS
css
form {
width: 60%;
margin: auto;
padding-top: 1%;
}
ul {
list-style: none;
padding-left: 0;
width: 100%;
text-align: center;
}
label {
font-size: 25px;
}
input[type=text], select {
text-align: center;
width: 55%;
font-size: 20px;
border: 1px solid #CCC;
border-radius: 1rem;
margin-bottom: 20px;
padding: 1%;
}
input[type=submit] {
text-align: center;
width: 55%;
font-size: 20px;
border: 1px solid #CCC;
border-radius: 1rem;
margin-bottom: 20px;
padding: 1%;
}
I think there is a better way to write it, so please use it as a reference.
Correct typographical errors