Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I explain to a programmer that CSS positioning has many benefits over table based layouts?

I have a friend who wishes to work as a freelance web developer, but insists that tables are the way forwards for layouts.

Several points he maintains in favour of tables:

  1. This is what was taught at the beginning of 10 years of programming & computer science degrees, thus it 'must' be right.
  2. Large companies use tables to achieve 'technical' things (like server side scripting and working with forms)
  3. It saves time.

I have coded him some examples of CSS exactly matching table based layouts, and provided many links to articles explaining SEO and accessibility benefits.

With regards to semantic uses of HTML tags, I have explained at length with examples how tables are great for displaying tabular data but not for general layout.

From the perspective of a client, I have been explaining to him that I wouldn't hire someone using outdated methods as their main strategy for layout. As he is my friend and I wish him every success, I believe it is important for him to gain the best start when pitching for work.

The question again: How can I explain to a programmer that CSS positioning has many benefits over table based layouts?

like image 208
Pat Avatar asked Apr 28 '10 20:04

Pat


2 Answers

Show him CssZenGarden. You can't do that with tables.

Designing with tables is really easy. Changing a tables design, such as "Put navigation on the left instead of the top," is anything but.

like image 92
Devon_C_Miller Avatar answered Nov 09 '22 20:11

Devon_C_Miller


This is what was taught at the beginning of 10 years of programming & computer science degrees, thus it 'must' be right.

So were frames and marquee tags. people dont use that anymore for a reason

Large companies use tables to achieve 'technical' things (like server side scripting and working with forms)

If by 'technical' things he means ugly looking things, then hes right. also as i said, tables are good for tabular data, and you SHOULD use them for that. also, i dont see how server side scripting and forms have anything to do with tables.

It saves time. Yeah it does, at least initially. if you want your code to be maintainable in the long run, tables will not save you time.

I would say that an approach that uses both tables and divs/css is best.

like image 36
mkoryak Avatar answered Nov 09 '22 21:11

mkoryak