I can’t set background-color for tr where subtotal placed.
Source http://jsfiddle.net/rPyn8/, check tr row with ‘subtotal’ it should have #cccccc.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are a few issues with this code. First off, the
trin question has itsbackground-colorset on thestyleattribute of thetrtag (in the html). Secondly, the childtdelements also have abackground-colorset, so even if you were able to set thebackground-colorof thetrelement, you still wouldn’t see any change because the childtdelements’background-coloris on top. To change the background of the childtdelements:Replace
.subtotal {background-color:red !important;text-align:right;}With
.subtotal td {background-color:red !important;text-align:right;}Also, you will notice that the border between the two cells is still the old color. You can fix this by adding the following CSS to
.subtotal td {}: