Home>
I'm making my own app with rails, but I want to stop the resizing function of the multi-line text input field used in the form input field of the new action.
As far as I looked at it with CSS
textarea {
resize: none;
}
I tried to do so, but it didn't work.
Please let me know if there is an appropriate method.
new.html.erb
<% @page_title = "Add new information"%>
<% = @page_title%>
<td><% = link_to "Back to details", @cow%></td>
<% = form_for @treat do | form |%>
<% = render "form", form: form%>
<% = form.submit%>
<% end%>
_form.html.erb
<table class = "form">
<tr>
<th><% = form.label: posted_at, "Date"%></th>
<td><% = form.date_select: posted_at, start_year: 2010, end_year: Time.current.year,
use_month_numbers: true%></td>
<th>Item</th>
<td>
<% = form.select: content, ["treatment", "fertilization", "pregnancy", "dry milk", "parturition"]%>
</td>
</tr>
<tr>
<th>Content</th>
<td colspan = "3"><% = form.text_area: detail, size: "70 * 20"%></td>
</tr>
</table>
table.css
table {
margin-right: auto;
margin-left: auto;
}
table.list, table.attr {
font-size: 100%;
width: 70%;
}
table.list td, table.attr td {
background-color: #cee;
border: 1px green solid;
text-align: center;
}
table.detail {
font-size: 200%;
width;30%;
}
table.detail td {
background-color: #cee;
border: 1px green solid;
text-align: center;
}
table.form {
font-size: 100%;
width: 50%;
}
table.form td, table.form th {
background-color: #cee;
border: 1px green solid;
text-align: center;
}
table.index {
font-size: 100%;
width: 20%;
table.index td {
background-color: #cee;
border: 1px green solid;
text-align: center;
}
textarea {
resize: none;
}
-
Answer # 1
Related articles
- html - input i want to make the text input field variable
- in php, the gender field of the input form is not displayed on the confirmation form
- call javascript function from html
- html - i want to add an automatic calculation function with js
- html - [implementation of like function] i want to solve the error of undefined method `id' for nil:nilclass
- html - simple input form of thymeleaf
- reactjs - i want to implement an add button in the input field using redux toolkit
- html - when i try to introduce the follow function, i am stuck with rake db:migrate and cannot get out
- html - display of date saved in input data of form_with
- html - about character input in ie with vba
- html - i want to align the line heads of input tags
- html - about input to text box in vba
- html - mechanism of undo/redo function of text editor
- [html] checking the number of digits in the input form by maxlength does not work
- html - phenomenon that characters are input next to characters
- i want to make php standard input a function!
- html - i want to extend the input part of bootstrap4 to the full column
- about tab function and screen split function (and resizing) under the environment of vim (editor) + urxvt (terminal) + tmux (ter
- xss measures for html editing function
- html - i want to adjust the characters according to the input frame
Related questions
- javascript - i am using chart kick, but the display of "loading" remains and the graph is not displayed
- javascript - how to associate columns of existing table with each other
- html - i would like to know how to calculate the average of the data
- html - i want to set the conditions to be displayed in collection_check_boxes
- ruby - passing variables using render partial
- ruby - about routing using rails collection
- ruby - how to delete cookies
- ruby - i want to get records that match multiple foreign keys from within an intermediate table
- ruby - i want to be able to see "liked posts" by the person on the rails development user detail page
- ruby - i can't do rails routes
I checked the log and found that it was using a file other than the CSS file that described the textarea, so when I moved the description of the textarea there, I was able to stop the resizing function in the input field. .