[thelist] A simple CSS queation: Line Break

Peter Brunone (EasyListBox.com) peter at easylistbox.com
Mon Dec 4 11:21:55 CST 2006

		   Setting the style property "display" to "block" should accomplish this goal.  However, if you only want it to happen when the validator trips, I'd suggest using some HTML along with your content, like this:

<asp:RequiredFieldValidator id="Blah" runat="server" yadda yadda...><div>You forgot something!</div></asp:RequiredFieldValidator>

   Since the DIV element has display:block by default, you don't have to add anything.  Of course you could just add a <br /> tag to your display instead, but that's up to you...



				From: "Casey Crookston" caseyc at IntelliSoftmn.com

Actually, I guess this is really a .NET question.... I have a bunch of
Required Field Validators set to display=dynamic and I need to force a
line break after each. I've been trying to do it with CSS but I can't
find a CSS attribute that forces a line break after the text.

What's the best way to do this? The line break should only happen if
the validator triggers. Thanks,


More information about the thelist mailing list