0

I use Ruby on Rails.

My view's source is :

<dl class="multi_list">
  <dt>                                                                                                                                                                                                                                                                      
    <%= f.label :subject %>
  </dt>
  <dd>
    <%= f.text_field :subject %>
  </dd>
</dl>

I can see the result from browser like this:

■Subject

But after I submit the form, and runs the validate source. The form in my browser went:

■
Subject

Why?


I know the answer:

Rails 3: "field-with-errors" wrapper changes the page appearance. How to avoid this?

Community
  • 1
  • 1
zhang-js
  • 1
  • 1

1 Answers1

0

You need to add style for the "dl.multi_list dt div.field_with_errors" and "dl.multi_list dt div.field_with_errors labels" .

icodebuster
  • 8,890
  • 7
  • 62
  • 65
Bachan Smruty
  • 5,686
  • 1
  • 18
  • 23