# O/T div.fieldWithErrors styling

**URL:** <https://www.ruby-forum.com/t/o-t-div-fieldwitherrors-styling/121418>\
**Category:** Rails\
**Created:** [November 27, 2007, 7:47pm UTC](https://www.ruby-forum.com/t/o-t-div-fieldwitherrors-styling/121418 "2007-11-27T19:47:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubynuby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ba9def/32.png) [@rubynuby](https://www.ruby-forum.com/u/rubynuby)\
**Post date:** [November 27, 2007, 7:47pm UTC](https://www.ruby-forum.com/t/o-t-div-fieldwitherrors-styling/121418/1 "2007-11-27T19:47:14Z")

</div>

this is kinda trivial but I’m anal and it bugs me 🙂

whenever there’s a error in the form the error field is wrapped with

 

this throws my form’s styling off because it puts too much space b/t  
fields and worse makes the form as wide as possible. How do I fix  
this? I’ve tried

div.fieldWithErrors {  
margin:0; padding: 0; display: inline;  
}

to no avail. Yes I am selecting the div correctly b/c I can see the  
result when I set background to red

---

<div class="post-metadata">

**Author:** ![rubynuby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ba9def/32.png) [@rubynuby](https://www.ruby-forum.com/u/rubynuby)\
**Post date:** [November 27, 2007, 8:18pm UTC](https://www.ruby-forum.com/t/o-t-div-fieldwitherrors-styling/121418/2 "2007-11-27T20:18:16Z")

</div>

On Nov 27, 2007 12:46 PM, rubynuby [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> div.fieldWithErrors {  
> margin:0; padding: 0; display: inline;  
> }
> 
> to no avail. Yes I am selecting the div correctly b/c I can see the  
> result when I set background to red

Is it possible you have another style the problematic div is inheriting  
from?

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)
