Jump to content

Lists Vs Tables


spiderwell

Recommended Posts

a long time ago, on a computer far far away, I used tables for almost all my html layout, especially forms and datagrids (page of database rows/columns).

Tables however seem to be seen as the devil these days, and css is encouraged with div tags or whatever. however the table is such an obvious thing for forms or datagrids.

I pretty much dropped tables from my code except for those 2 examples, however i had one day an idea to put everything in lists (mostly because I was mucking around with drag and drop thumbnail lists).

I find now that a well structured css applied to a <ul> can look just as good if not better than a table equivlent, and if I have anything that I know will warrant that kind of layout will now always opt for that as an alternative to using tables. it also gives me a bonus of allowing drag/drop ordering quite easily.

 

What are other peoples thoughts on lists vs tables for such layouts?

 

Link to comment
Share on other sites

I use list for my css horizontal drop down menus and for vertical menus as well but it seems list would make it harder to do something like this with forms

 

Column 1 Title 1:Column 2 select or enter this

Column 1 Title 2:Column 2 select or enter that

 

I just set column width if needed and add styles to my rows and cells with class divs

 

In other words, nice straight columns

Link to comment
Share on other sites

The HTML table model allows authors to arrange data ... into rows and columns of cells.

Tables is not always evil. It's evil when someone uses their whole site in a giant nested table, yes. However, when using tables for what it is meant for - tabular data - it is not evil. You essentially recreated tables using a different method (unordered lists). Yours isn't wrong per-say, but it's not the method I would have used.

Link to comment
Share on other sites

Jezz divs in the list sounds good.

 

I would have never of thought of that, well "maybe" in a month or two from now when I was asleep and would wake up at 2:00am and would say to myself. I could use divs in list. Boy am I smart or dumb or slow depending or what ever on my mood.

 

It's like I learn on here several weeks ago to use str_replace to place text in p tags so I could make it pretty with text-indent. I would have never have thought of that either.

Link to comment
Share on other sites

this thread makes me shiver like really bad. <ul>'s and css are a good way to go and creating a table layout with div's isn't any harder than with a table tag and is easier to manage.

 

Sure, it might not be harder to make... but are you using the right tool for the job? I might be able to hit a nail in with a screwdriver, but was it really the best way to do it?

Link to comment
Share on other sites

this thread makes me shiver like really bad. <ul>'s and css are a good way to go and creating a table layout with div's isn't any harder than with a table tag and is easier to manage.

 

Sure, it might not be harder to make... but are you using the right tool for the job? I might be able to hit a nail in with a screwdriver, but was it really the best way to do it?

Like

Link to comment
Share on other sites

this thread makes me shiver like really bad. <ul>'s and css are a good way to go and creating a table layout with div's isn't any harder than with a table tag and is easier to manage.

 

Sure, it might not be harder to make... but are you using the right tool for the job? I might be able to hit a nail in with a screwdriver, but was it really the best way to do it?

 

Wait, if its not any harder and it's easier to manage why wouldn't it be the best tool for the job.

Link to comment
Share on other sites

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.