Jump to content

Have I used tables correctly or should I be doing with with css?


Snot

Recommended Posts

well you are allready using css, but inline style, which makes your tabular design redundant. for example:

<td align="right" valign="top">Size</td>

Your have quite a bunch of those TD's and they all have the exact same properties (valign and align). better use an external stylesheet that says;

 

table#mytable td.right{ /* so you give your table an id to make sure only the td's inside that will be affected */
     valign: top;
     align: right;
}
table#mytable td.left{ /* so you give your table an id to make sure only the td's inside that will be affected */
     valign: top;
     align: left;
}

 

As you can see i made 2 situations one for left align and one for right align. ones you give the td the right class it behaves as you like. While separating style from the mark-up.

 

Although it might be useful to have a look in something else than tabular design.

check out these guys: https://examples.wufoo.com/forms/buy-a-tshirt/

They don't use a table at all. I find that correct since it's not rough data.

 

well if you use tables or Ul's doesn't matter really, but i prefer ul's or divs if it's for design purposes.

besides that, you should make those form's on the fly with php :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.