Archive for the '79444' Category

CSS and Tables; The war continues

Written by on Tuesday, November 11th, 2008 in 79444.

Time for a bit of fun. The eternal battle of tables vs. CSS layouts continues. We geeks have had classics such as vi vs. emacs, and Star Wars vs. Star Trek.

First up we have giveupandusetables.com:

And then we have shouldiusetablesforlayout.com:

You have to take a look at the source for that one :)

HTML:

  1.  
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  3.  "http://www.w3.org/TR/html4/strict.dtd">
  4.   <meta http-equiv=“Content-Type” content=“text/html; charset=utf-8″ />
  5.    <title>Should I use tables for layout?</title>
  6.    <style type=“text/css”>
  7.       html,body{
  8.        background:#999;color:#ccc;
  9.       }
  10.       h1{
  11.         font-family:"Georgia",Helvetica,Arial,Sans-Serif;
  12.         font-size:10em;
  13.         padding:.1em 0;
  14.         text-align:center;
  15.         color:#333;
  16.         margin:.5em auto;
  17.       }
  18.   </style>
  19. </head>
  20.   <h1>No.</h1>
  21.   <!– Honestly, no. –>
  22.  
  23.   <!–
  24.     <table border="0" width="100%">
  25.       <tr>
  26.         <td align=“center”>No.</td>
  27.       </tr>
  28.    
  29.   –>
  30.   <!– Fact: Chuck Norris hates layout tables! –>
  31. </body>
  32. </html>
  33.  

Who will win? Maybe both, with display: table in the future.

Source: Ajaxian » Front Page
Original Article: http://feeds.feedburner.com/~r/ajaxian/~3/450315522/css-and-tables-the-war-continues



Site Navigation