Rod McLaughlin


CSS is the new XML (16 jan 13)

I exaggerate. Cascading Stylesheets do have a use: making web pages look good in a way that makes them easier to change. But it's become a religion. Webgirls and IDEs tell you that you can't use <table> any more. Or <center>. So I researched how to turn all the tables in all my websites into CSS. Luckily, I found this before I'd gotten too far:

http://www.flownet.com/ron/css-rant.html

On using CSS to achieve the same flexible layout as tables:

 "It may be possible. I don't have a mathematical proof that it's not. But..."

In contrast, he explains how to use tables to do layout, and CSS to make them look good -

see css-table-example.html:

<body>
<style>
table.demo1 { width: 480px; margin: auto; 
              border-collapse: collapse; }
table.demo1 td { text-align: center; border: 
                 solid 1px gray; padding: 10px; }
table.demo1 td.shaded { background-color:#ddd; }
table.demo1 td.center { width: 80%; }
table.demo1 td.left { background-color: #cce; }
</style>
<table class=demo1>
  <tr><td class=shaded colspan=3>Top</td></tr>
  <tr>
    <td class=left>Left</td>
    <td>
      <h1>Center</h1>
    </td>
    <td>Right</td>
  </tr>
  <tr><td class=shaded colspan=3>Bottom</td></tr>
</table>
</body>

 



Back
Portland London