Styling jQuery validation

Posted by Steve on Stack Overflow See other posts from Stack Overflow or by Steve
Published on 2010-04-09T17:04:47Z Indexed on 2010/04/09 17:33 UTC
Read the original article Hit count: 532

When I have this, the div, which just has text in it, uses all the horizontal width it can, so there's trailing width after the text, which I can tell from the background color.

    errorElement: "div",
    errorPlacement: function(error, element) {

            error.insertBefore("#zzz");

When I use this, the width is the same as the text contained, but I cannot get each individual error (span) to be on a separate line via display: block.

    errorElement: "span",
    errorPlacement: function(error, element) {

            error.insertBefore("#zzz");
            error.css("display", "block");

Is there another way to force a break on a span element?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-validate