Why tableless layout does not mean painless layout
If you look after “tableless layout” in google, you will find many articles about why you should not use tables for layout purposes.
Indeed, the most occurrences of tables in html code should be replaced by ul’s or div’s, especially for horizontal lists. But if you want to display a tabular structure, like spredsheets, table’s still are the best solution, and finally that was the original purpose for them.
Working with divs there with “display:table” produces unclear code and you never know which div is a row and which one is a cell without switching between html and css permanently(or you call everything “td” or “tr”). In addition it’s still not working properly in some browsers. Of course, it would be nice to change the full layout with css only, but i think in practice it’s also important that you understand your own code, especially after a longer period of time. Doing everything with css also means that your css will grow and grow, and i think it’s hard to choose clear and recognizable id- and class-names for big projects, so the css will often become unclear, too.
Working with “float:left|right” is a good solution in some cases, but i think it’s still more harder to imagine and to debug if something is wrong. “display:absolute” makes the layout absolute static.
Some people say that some readers, especially from disabled people, cannot handle tables. I cannot believe that. Since there was a time where almost the whole web was made of tables, the readers should have learned to convert tables into simpler structures today.
Tables should not be used to place an icon in front of a link, or to make horizontal lists, but i think in some cases its just the easiest way to realize some type of layouts. If you earn your keep with webdesign time will be money!
Learn more about tableless layout:
http://www.w3.org/2002/11/homepage
http://webdesign.about.com/od/css/a/aa102102a.htm
|
|
No Comments »
RSS feed for comments on this post. TrackBack URL
