What David said. You might also try running your source through the w3 validator.
I will also add that I tried going with :nth-child for zebra stripes myself once. Then I realized it didn't work so well when using multiple tbodys, header cells with rowspan, etc. I went back to using .even .odd classes on the tr. It's the only way to be sure. Ramsey On Feb 20, 2013, at 7:28 AM, David LeBer wrote: > Tim, > > Css selectors work on the completed dom as understood by browser, it knows > nothing about how the page is being created server-side and doesn't care. > > It sounds like your table is malformed, try carefully inspecting the rendered > dom in Safari or Firefox (i.e: "Inspect Element"). If I had to, I'd guess > that there is a tag missing somewhere that the browser is filling in making > each tr nested in it's own table. > > D > > -- > David LeBer > Codeferous Software > > On 2013-02-20, at 12:55 AM, Tim Worman <li...@thetimmy.com> wrote: > >> 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 (Webobjects-dev@lists.apple.com) >> Help/Unsubscribe/Update your Subscription: >> https://lists.apple.com/mailman/options/webobjects-dev/dleber_wodev%40codeferous.com >> >> This email sent to dleber_wo...@codeferous.com > > > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/webobjects-dev/ramseygurley%40gmail.com > > This email sent to ramseygur...@gmail.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com