Tables vs CSS for positioning and design
Duplicate: Tables instead of DIVs and Why not use tables for layout in HTML?
I am working on building a web app using ASP .NET MVC (needs to run on IE 7, FF 3.0), does it matter if I were to use tables rather than css for positioning and design?
As a developer I haven't had a chance to work with css.
Yes, it matters. The most convincing argument that I've used in favor of CSS over tables is that screen readers (for the visually impaired) trip over tabular layout. That's a good argument by itself, but it gets a whole lot better when you take into account the fact that Google reads your web site just like a screen reader would. If you want Google to have an easier time indexing your site, use CSS for layout. Tables are for tabular data.
Apart from all the "tables are evil" school of thought, you'll find it much easier to change the design in the future if you use pure css layout.
In addition, your mark up will a whole lot simpler and easier to "read".
Take a look at css. It shouldn't take more than a day to get up to speed.
Use tables when you really do want to show tabular data.
Otherwise you really ought to be using CSS for your layout.
The main reason is that CSS works better for "unusual" browsers like the following:
If you work for the US Government that last one is a legal requirement.
Also see these questions:
Tables instead of DIVs
Why not use tables for layout in HTML?
上一篇: DIVS比表格有什么优势?
下一篇: 表格与CSS的定位和设计