I have a simple html form.
This form has a specific width and margin auto so the form is in the middle of the screen.
form
{
margin: 0px auto;
padding: 0;
min-width: 600px;
width: 650px;
}
I validate if all textboxes are filled. I use asp:RequiredFieldValidator with an own css class
.ErrorMessage
{
position:relative;
left: 80px;
width: 150px;
font-weight: bold;
display:inline;
}
But the error message are not shown right off the form because of the max width of the form. The error message will break to a second line. I can’t use absolute position because the form is in the middle of the screen.
The problem is that the form has a border and i can’t expand the max width.
This is a screenshot: http://suffball.de/form_error.png
How can I put the error message in right of the form? I need a solution without javascript.
Is this possible?
Thank You!
Change your
.ErrorMessageCss Class like below:Hope this will solve your issue.