CSS Cells within Tables (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets and Accessibility



Message


Laurie Cesario -> CSS Cells within Tables (6/30/2006 11:55:44)

Question on cells within tables....

We're in the process of re-desiging our website and want to use CSS as much as we can, but we still have a need to display our product info in tables.

I've created a new class ".ool" for tables that will house our order online product info. My question is, can I modify the class .ool so that the cells (td) within those tables will have a border? The other table cells within our site cannot have a border. Here's what we have so far:

p, td, div {
border: none;
color: #000000;
font-family: Helvetica, Verdana, Arial, sans-serif;
font-size: x-small;
font-style: normal;
font-variant: normal;
font-weight: normal;
letter-spacing: normal;
text-decoration: none;
}

table.ool {
color: #000000;
font-family: Helvetica, Verdana, Arial, sans-serif;
font-size: x-small;
font-style: normal;
font-variant: normal;
font-weight: normal;
letter-spacing: normal;
text-decoration: none;
text-align: center;
border-color: gray;


Is it possible to modify my table.ool class to accomplish this?

Thanks!
Laurie




jaybee -> RE: CSS Cells within Tables (6/30/2006 19:26:05)

CSS

table.ool td{
border: 3px solid #cccccc; }

applies this to all td elements within any table with a class of ool

HTML

<table class="ool">
<tr>
<td>bbbb</td>
<td>bbbb</td>
</tr>
<tr>
<td>bbbb</td>
<td>bbbb</td>
</tr>
</table>







Laurie Cesario -> RE: CSS Cells within Tables (7/3/2006 10:34:42)


quote:

ORIGINAL: jaybee

table.ool td{
border: 3px solid #cccccc; }



Jaybee,

Thanks so much for your help! I listed your "table.ool td" declaration above my original one in the stylesheet(see below). Is this the proper way to do it?

------------------------------

table.ool td{
border: 3px solid #cccccc; }


table.ool {
color: #000000;
font-family: Helvetica, Verdana, Arial, sans-serif;
font-size: x-small;
font-style: normal;
font-variant: normal;
font-weight: normal;
letter-spacing: normal;
text-decoration: none;
text-align: center;
border-color: gray;
}




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
6.298828E-02