Just a quick question, should I layout my tabular data and forms using XHTML elements (<tr>’s, <td>’s etc… even though in some situations that is considered presentation) or should I use CSS instead?
@doodlerAug 19.2007 — #The generel rule is to use CSS for presentation and (x)HTML for structure BUT that is not to say that something structured at the bottom of xHTML code will necessarily be rendered there by the browser because that depends on what/how you've told it to load (again, using CSS, if indeed you've used any).
Table can be used for presentation. But try using <div> in combination with CSS instead if you can.
@lunforgottenlauthorAug 19.2007 — #well I can use either <tr>'s and <td>'s to structure my form which is an easier method but in some situations that is considered presentation and not tabular data which is structure. So following the W3C standards, should I use CSS to layout my form or XHTML elements?
@felgallAug 19.2007 — #The best way is to simply apply the appropriate floats and clears to the label and input fields so as to align them next to one another the way you want. (They also need to be display:block and have an appropriate width)
@ray326Aug 20.2007 — #If you go the table route then the semantics would be labels in TH and inputs in TD. Here are some articles that should be interesting.
@lunforgottenlauthorAug 20.2007 — #yeah well if I go the table route is that ok? It is the easier way to get it done but some could say that tables are presentation and presentation should be done in CSS.... So what do professional programmers usually do, do they go for tables or CSS when laying out a <form>?