Jump to content

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


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 :)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.