I am trying to style a table in a Wordpress post, but am having difficulty getting it to work. I have set the post to HTML-editing mode and can get some of the styles to take, but not all. (To be honest, this is not the first time I have had trouble getting table styles to work.) The contents of the post (using contrived styles and high-contrast colors to make it easy to identify elements) are below.
This is the incorrect result I am getting:

As you can see, the cells are not picking up the styles but the table itself is, well, mostly.
I thought that maybe it is the blog’s theme that is interfering, but from my understanding of HTML, the STYLE tag that comes right before the table is supposed to override anything that comes before it (and is partly doing so). If I put some style info directly into the TD tags, it works, but that is obviously not a practical solution.
Can anyone help me figure out how to get a table style to work in a Wordpress post? Thanks a lot.
<!-- script type="text/javascript" src="/Common/JS/SortTable.js"></script -->
<style type="text/css">
table.sortable {
margin : auto;
border-style : dashed;
border-color : #000000;
border-width : 2px;
color : #000000;
background-color : #ff0000;
}
table.sortable td {
border-style : dashed;
border-color : #000000;
border-width : 2px;
width : 100px;
background-color : #0000ff;
}
table.sortable .title {
width : 300px;
background-color : #00ff00;
}
</style>
<table id="mylist" class="sortable">
<thead>
<tr>
<th>Title</th>
<th>Foo</th>
<th>Bar</th>
<th>Baz</th>
</tr>
</thead>
<tbody>
<tr>
<td class="title">Something</td>
<td sorttable_customkey="5"></td>
<td sorttable_customkey="5"></td>
<td sorttable_customkey="5"></td>
</tr>
<tr>
<td class="title">Something Better</td>
<td sorttable_customkey="4"></td>
<td sorttable_customkey="5"></td>
<td sorttable_customkey="5"></td>
</tr>
<tr>
<td class="title">Something Worse</td>
<td sorttable_customkey="3"></td>
<td sorttable_customkey="4"></td>
<td sorttable_customkey="3"></td>
</tr>
<tr>
<td class="title">Something Horrible</td>
<td sorttable_customkey="3"></td>
<td sorttable_customkey="4"></td>
<td sorttable_customkey="1"></td>
</tr>
</tbody>
</table>
border-color: #000000!important;(for each style that isn't applying correctly).. that will at least confirm if there's some inheritance problem. – t31os Feb 22 '11 at 13:51