[thelist] CSS: best way to format for TD's and A's

Casey Crookston casey at thecrookstons.com
Tue Aug 19 15:49:09 CDT 2003


What is the most effective way to format css code and html for a class to be
effective with in <td> and <a> tags.

Example:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Goal: regular text is white, 11px Arial, no underline, 5 point padding on
the left.  Link text is same but blue.  Hovered is underlined.

.tab {
 font-family : Arial, Helvetica, sans-serif;
 font-size : 11px;
 color : white;
 text-decoration : none;
 padding: 0px 0px 0px 5px;
}

a.tab {
 color : #0000ff;
}

a.tab:hover {
 text-decoration : underline;
}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<table>
   <tr>
      <td>text 1</td>
      <td><a href="fubar.html">text 2</a></td>
   </tr>
</table>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Now, given the above css and HTML, what is the most efficent way to format
both to accomplish the goal?

Thanks in advance.




More information about the thelist mailing list