Forms are frequently used. However, when building a web standard website, his layout is often forgotten. When it comes to practical use, I find it a headache. Of course, I have also encountered it. Now I want to introduce a method for creating beautiful and specific forms with the <fieldset> </label> label.
Reference content is as follows: Basic xHTML: <H3> Registered User Logon <Form action = "" method = "post" name = "apLogin" id = "apLogin"> <Fieldset> <Legend> User Logon </legend> <Div> <Label for = "Name"> User Name </label> <Input type = "text" name = "Name" id = "Name" size = "18" maxlength = "30"/> <br/> </Div> <Div> <Label for = "password"> password </label> <Input type = "password" name = "password" id = "password" size = "18" maxlength = "15"/> <br/> </Div> <Div class = "cookiechk"> <Label> <input type = "checkbox" name = "CookieYN" id = "CookieYN" value = "1"/> <a href = "#" title = "select whether to record your information "> remember me </a> </label> <Input name = "login791" type = "submit" class = "buttom" value = "login"/> </Div> <Div class = "forgotpass"> <a href = "#"> have you forgotten your password? </A> </div> </Fieldset> </Form> After reading the code, we found that the label description is in <label> </label>. Just make the <label> </label> label floating left alignment, the <div> clear float contained in fieldset can achieve the common layout. Below is the basic CSS:
|
<! DOCTYPE <a href =" http://www.blue1000.com/bkhtml/c22/ "_ Fcksavedurl =" http://www.blue1000.com/bkhtml/c22/ "Title =" HTML/JavaScript tutorial "> HTML </a> PUBLIC"-// W3C // dtd x <a href =" http://www.blue1000.com/bkhtml/c22/ "_ Fcksavedurl =" http://www.blue1000.com/bkhtml/c22/ "Title =" HTML/JavaScript tutorials "> HTML </a> 1.0 Strict/EN "" http://www.w3.org/TR/x <A href =" http://www.blue1000.com/bkhtml/c22/ "_ Fcksavedurl =" http://www.blue1000.com/bkhtml/c22/ "Title =" HTML/JavaScript tutorial "> HTML </a> 1/DTD/x <a href =" http://www.blue1000.com/bkhtml/c22/ "_ Fcksavedurl =" http://www.blue1000.com/bkhtml/c22/ "Title =" HTML/JavaScript tutorial "> HTML </a> 1-strict.dtd"> <a href =" http://www.blue1000.com/bkhtml/c22/ "_ Fcksavedurl =" http://www.blue1000.com/bkhtml/c22/ "Title =" HTML/JavaScript tutorial "> HTML </a> <a href =" http://www.blue1000.com/bkhtml/c21/ "_ Fcksavedurl =" http://www.blue1000.com/bkhtml/c21/ "Title =" XML tutorial "> XML </a> ns =" http://www.w3.org/1999/x <A href =" http://www.blue1000.com/bkhtml/c22/ "_ Fcksavedurl =" http://www.blue1000.com/bkhtml/c22/ "Title =" HTML/JavaScript tutorial "> HTML </a>">
Run code
Copy code
Save code
Add to favorites