![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Feb 2009
Posts: 5
OS: Vista
|
Fieldset or Span?
I am creating a form maker with HTML and JavaScript. I am splitting the form areas using an unordered list. Like so.
HTML Code:
<form> <ul> <li> <label for="first">Name: </label> <input type="text" name="first" id="first" value="" maxlength=""/> <label for="first">First</label> <input type="text" name="last" id="last" value="" maxlength=""/> <label for="last">Last</label> </li> </ul> </form> However they need to be separated to provide the result I want. So should I use a span or fieldset? Here is an example... HTML Code:
<form> <ul> <li> <span> <label for="first">Name: </label> </span> <span> <input type="text" name="first" id="first" value="" maxlength=""/> <label for="first">First</label> </span> <span> <input type="text" name="last" id="last" value="" maxlength=""/> <label for="last">Last</label> </span> </li> </ul> </form> This is what I want... HTML Code:
<head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> <style> li{ list-style:none; } li span{ float:left; margin: 0 5px 0 0; } label{ clear:both; display:block; margin:0; } input[type="text"] ** margin:0; center top; } </style> </head> <body> <form> <ul> <li> <span> <label for="first">Name: </label> </span> <span> <input type="text" name="first" id="first" value="" maxlength=""/> <label for="first">First</label> </span> <span> <input type="text" name="last" id="last" value="" maxlength=""/> <label for="last">Last</label> </span> </li> </ul> </form> </body> I do not know if there are any advantages or disadvantages when it comes to search engines etc... What is the best way to code this? Is there a way to do this without separating it? Is doing this with a list good? etc.. |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Registered User
|
Re: Fieldset or Span?
The span tag won't actually do anything visually to the page unless you add styles to it - it's just like a DIV.
Fieldset would generally be used. Is this something like what you want? Code:
<form>
<fieldset>
<legend>Name</legend>
<input type="text" name="first" id="first" value="" maxlength=""/>
<label for="first">First</label>
<input type="text" name="last" id="last" value="" maxlength=""/>
<label for="last">Last</label>
</fieldset>
</form>
__________________
Kieran C |
|
|
|
![]() |
| Thread Tools | |
|
|