Topic: Error Messages with Nested Form Elements/ Text Fields (CSS related)
I have a little CSS issue with a nested label/textfield element and the Rails fieldWithErrors:
my CSS file looks as the following:
margin: 0.7em 0em;
.. and in my View I use it like:
<label>Some Field: <%= text_field 'some', 'field' ></label>
The reason why I use this nested CSS is because it makes building forms much quicker and it looks very neat.
Now, when I output the error messages for a model this collapses - obviously. The CSS for the fieldWithErrors breaks my defined label/input CSS. I have tried to set the same values to the fieldWithErrors class as I have it for the nested input field, but that's even worse.
Anyone has experience with this an could help me out?
Thanks in advance.