Is there a way to make style classes that are additive without the use
of additional elements?
.Header {
font-weight:bold;
}
.SubEntry {
padding-left:10px;
)
...
<tr>
<td class="Header">Item</td>
<td></td>
</tr>
<tr>
<td class="Header SubEntry">SubItem 1</td>
<td></td>
</tr>
<tr>
<td class="Header SubEntry SubEntry">SubSubItem 1</td>
<td></td>
</tr>
...
Essentially having each item nested under the next, so that the two
SubEntry classes applied to the last item add their padding together? I
know I could nest elements to do that, but I was hoping it could be
accomplished by just using CSS.
Thanks,
Steve
Neal - 28 Oct 2004 19:32 GMT
> Is there a way to make style classes that are additive without the use
> of additional elements?
Not as you're trying to do it, no. Some styles, if applied to a container
and to a child, will multiply. If you use list markup, what you're after
will be done automatically, BTW.
I don't think table markup is a useful tool for what you are doing.
Spartanicus - 28 Oct 2004 20:41 GMT
>Some styles, if applied to a container
>and to a child, will multiply.
You may want to rephrase that (when you've sobered up ;)

Signature
Spartanicus
Neal - 29 Oct 2004 05:00 GMT
>> Some styles, if applied to a container
>> and to a child, will multiply.
>
> You may want to rephrase that (when you've sobered up ;)
That was like 2 in the afternoon for me. I'm not that bad of a drunk! ;)
Spartanicus - 29 Oct 2004 09:28 GMT
>>> Some styles, if applied to a container
>>> and to a child, will multiply.
>>
>> You may want to rephrase that (when you've sobered up ;)
>
>That was like 2 in the afternoon for me. I'm not that bad of a drunk! ;)
When I first read it I thought you were babbling about inheritance using
inappropriate phrasing. But I now suspect that you were referring to
something else, I still don't know what, for the OP's benefit a
clarification would be appropriate.

Signature
Spartanicus
Steve - 28 Oct 2004 22:57 GMT
>> Is there a way to make style classes that are additive without the use
>> of additional elements?
[quoted text clipped - 4 lines]
>
> I don't think table markup is a useful tool for what you are doing.
If I didn't have all the tabular data associated with each item in this
tree, then yes, I would agree that list markup would probably be the way
to go. The example I threw out was just a simple one, and doesn't have
all of the table columns that will be displayed. The tree could go
infinitely deep, so I was hoping for something additive, but since it's
generated dynamically I guess I'll just wrap each item with the
appropriate number of elements to make it work.
Thanks
Brian - 29 Oct 2004 17:56 GMT
>> I don't think table markup is a useful tool for what you are doing.
>
> If I didn't have all the tabular data associated with each item in
> this tree, then yes, I would agree that list markup would probably be
> the way to go. The example I threw out was just a simple one, and
> doesn't have all of the table columns that will be displayed.
Then give us a url for the real example, in all its complex glory.

Signature
Brian (remove "invalid" to email me)
Brian - 28 Oct 2004 20:19 GMT
> Is there a way to make style classes that are additive without the use
> of additional elements?
[quoted text clipped - 10 lines]
> <tr>
> <td class="Header">Item</td>
How about <th>Item</th> if this is a table header? Use the scope
attribute at is convenient for the reader.
> <td></td>
Why does each row contain an empty cell? Is this really tabular data?
> </tr>
> <tr>
[quoted text clipped - 9 lines]
> Essentially having each item nested under the next, so that the two
> SubEntry classes applied to the last item add their padding together?
No. But if this is a sub sub item, you should express that in the markup
if that is at all possible. I think we need a url with more details to
give you a better answer.

Signature
Brian (remove "invalid" to email me)