Tables are for data, not forms!
Page 1 of 19 Replies - 3432 Views - Last Post: 15 August 2011 - 06:57 AM
#1
Tables are for data, not forms!
Posted 10 August 2011 - 11:16 AM
It seems as if everybody's response is "use css". However, I have no idea how to do that. If you mention some complicated way, do provide an example.
Thanks.
Replies To: Tables are for data, not forms!
#3
Re: Tables are for data, not forms!
Posted 10 August 2011 - 03:33 PM
But on topic, I understand your pain. I sometimes fall for using tables in this situation too, but the only other option that I can see is floated elements of fixed width. I have a personal aversion to floated elements, since every time I go to use them, I look for a tutorial and realise I can't understand it without A. access to the Rosetta Stone, and B. membership in the Freemason's Guild
This post has been edited by e_i_pi: 10 August 2011 - 03:34 PM
#4
Re: Tables are for data, not forms!
Posted 10 August 2011 - 04:38 PM
I use tables to format forms all the time, usually for speed and laziness though.
#5
Re: Tables are for data, not forms!
Posted 10 August 2011 - 06:01 PM
I would highly recommend reading dorm's link on the subject.
#6
Re: Tables are for data, not forms!
Posted 11 August 2011 - 09:45 PM
Lemur, on 10 August 2011 - 06:01 PM, said:
I would highly recommend reading dorm's link on the subject.
I must admit, I never thought of using them like that. I have a set of 3 divs I usually use to create a row, a label, and an input field. Way cleaner than using tables and easier to manipulate. But list items seem to be cleaner on the HTML side.
I'll have to try that on my next form.
#7
Re: Tables are for data, not forms!
Posted 11 August 2011 - 10:23 PM
#8
Re: Tables are for data, not forms!
Posted 13 August 2011 - 12:39 AM
creativecoding, on 10 August 2011 - 11:16 AM, said:
It seems as if everybody's response is "use css". However, I have no idea how to do that. If you mention some complicated way, do provide an example.
Thanks.
Forms are used so your visitors can interact with your site and send data.
Tables are used so you can place the content on specific point you want to.
My advise is to learn CSS.
Try this course w3c schools offer and I think everyone can manage it: http://www.w3schools.com/css/
#9
Re: Tables are for data, not forms!
Posted 14 August 2011 - 02:11 PM
TweeTmyFreaK, on 13 August 2011 - 02:39 AM, said:
Tables are used so you can place the content on specific point you want to.
My advise is to learn CSS.
Try this course w3c schools offer and I think everyone can manage it: http://www.w3schools.com/css/
Careful on advisories. If you'll pay attention the OP knows a handful of CSS and has stated that he wishes to learn ways to do something specific, generally implying that he knows enough CSS to get around and at least tread water.
#10
Re: Tables are for data, not forms!
Posted 15 August 2011 - 06:57 AM
Best Way
<fieldset>
<legend>Personal Info</legend>
<label for="firstname">First Name</label>
<input type="text" name="firstname" id="firstname" />
<label for="surname">Surname</label>
<input type="text" name="surname" id="surname" />
</fieldset>
<!-- etc .. -->
Unordered List
<fieldset>
<legend>Personal Info</legend>
<ul>
<li>
<label for="firstname">First Name</label>
<input type="text" name="firstname" id="firstname" />
</li>
<li>
<label for="surname">Surname</label>
<input type="text" name="surname" id="surname" />
</li>
</ul>
</fieldset>
<!-- etc .. -->
Definition List (You are losing semantics here as you're not defining anything)
Within that you have 2 sub-elements, <dt> and <dd>, a definition term and description respectively.
By using these it's pretty easy to layout your forms like this:
<fieldset>
<legend>Personal Info</legend>
<dl>
<dt><label for="firstname">First Name</label></dt>
<dd><input type="text" id="firstname" name="firstname" /></dd>
<dt><label for="surname">Surname</label></dt>
<dd><input type="text" id="surname" name="surname" /></dd>
<!-- etc .. -->
</dl>
</fieldset>
This post has been edited by RudiVisser: 15 August 2011 - 07:06 AM
|
|

New Topic/Question
Reply




MultiQuote








|