February 21, 200818 yr Hi all. I've created a page using CSS, but under my "content" div I've used a table to layout a form. How can I get this same effect without using a table? Page can be found here: http://www.axic53.dsl.pipex.com/contact.html
February 21, 200818 yr I used to recommend lists, but after a mail list discussion recently about the subject I'm unsure. http://www.mail-archive.com/wsg@webstandar...g/msg32998.html By using the method they argue it'll look something like this: <form> <fieldset> <label for="subject">Subject:</label> <input type="text" id="subject" name="subject" /> <br /> <label for="name">Name:</label> <input type="text" id="name" name="name" /> <br /> <label for="message">Message:</label> <textarea id="message" name="message"></textarea> <br /> <label for="contact">Contact Email Address:</label> <input type="text" id="contact" name="contact" /> <br /> </fieldset> </form> label { display: block; }
February 21, 200818 yr Note to Ben: HTML code areas doesn't preserve white space as the CODE area does...
February 22, 200818 yr Author Note to Ben: HTML code areas doesn't preserve white space as the CODE area does... Oh ok, Thanks. Quick question though, why is fieldset needed? If you remove the fieldset tags it looks the same. What does fieldset do?
February 22, 200818 yr The fieldset is used to group form elements. <legend> is used to add a title to the fieldsets. In your case it's probably no real value in it. It's just a force of habit I go.
Create an account or sign in to comment