hi all,
i have a simple form with 5 fields username,email id,password,retype password and phone no.they all to be displayed in correct format as one after other.my am getting error for last field i.e.,phone no is is not displayed properly
how to display the 5th field in correct format…below is the code i have written in css…
if there are more than 4 fields tell me how to display all in correct format.
You’ll need to show us your full HTML and CSS for us to be able to help with this. When you say you get an error, what do you mean? Is the form field not displaying the way you want, or are you getting a PHP error?
The first thing i can see is you have 5 values in your padding property which only accepts 4 values which are (top, right, bottom and left), also without a link to your page it’s hard to diagnose any issues occurring with your page.
here is my complete css code and html code.
in html i have 5 fields username,email id,password,retype password and
phone no.i have to display them in order as it is common in many pages.but my last field(phone no) is not correctly fitting in the
.form label
{
float:left;
width:100px;
padding:10px 10px 0 10px 0;
font-weight:bold;
}
i am getting doubt in the above code only tell me what to do to get the correct format
I think you have a misunderstanding of how the padding property works, padding applies to the inside of an element and all elements based on the selector in the CSS. In your case the selector is .form label, if we are to set
.form label {
padding: 10px 10px 0 10px;
}
This will set the top, right and left padding for all the label elements on the page that are within the element that contains the class .form. To fix the issue you are having with the phone no all you need to do is simply add the clear property with a value of left so the label elements clear the padding of the previous label.
i need to increase my form value in
.form
{
float:left;
padding:0 10px 10px 10px;
background:#f3f3f3;
border:2px solid #cfcfcf;
}
field tell me how to change it because retype password field in not in correct position to its text box.
also i need colons in each field to be displayed in correct manner like
username :textbox
email id :
password :
Retype password :
phone no :
how to change the length of the form field
so that retype password should be in single line…
and colons in each field should display in same way one after other