Ruby ver. 2.6.5 Rails ver. 6.0.3.4
After the post input form was rendered due to a typo, the shape collapsed ↓
↓
It was solved by writing the following in the CSS file.
post.css
.field_with_errors {
display: contents;
}
In Rails, the field containing the error message is automatically surrounded by a div tag with the field_with_errors class, which seems to break the layout.
Recommended Posts