css on custom table row component
css on custom table row component
- Subject: css on custom table row component
- From: Tim Worman <email@hidden>
- Date: Tue, 19 Feb 2013 21:55:25 -0800
I have a single component that acts as a table row. The outer-most object in the component is a AUC where the elementName is "tr". I also have css that is supposed to style each of these rows sth like:
.resultsTable tbody tr:nth-child(odd) td{background-color:#EEEEEE;}
The entire enclosing page is rendered fine including the table and all rows are rendered correctly as tr's. The problem is the rows aren't styled correctly per the css. It appears every single row considers itself "odd." So every row has the background color as defined in the css.
I have other components where the entire table is similarly built completely dynamically but the TR's are not a separate component. In those cases the css is properly applied to each TR.
I know I could return separate css classes in code for even and odd indexes in my TR component, but I want to use the existing css so that any future css changes are inherited by all appropriate components.
Tim
UCLA GSE&IS
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden