changing default selected column row colors

changing default selected column row colors

dinotomdinotom Posts: 27Questions: 7Answers: 0
edited April 2014 in General
I am brand new to Datatables and love it. Thank you for the work involved in putting this plug in together and maintaining it.
I have add ed datatables to my project and am trying to customize for my site. I have figured out how to set pagination, what columns to sort by, what columns shouldnt be sortable etc, etc but I can't seem to figure out how to reset the default (currently purple) shading that datatables applies to columns that are selected for sorting (by clicking on the header or the ones defined as default sorts on load). I want to restyle those properties so they match my current theme but at a stronger color in the same line

I tried adding these lines to my main css style sheet
[code]
table.dataTable tr.odd .sorting_1 { background-color: #90af90; }
table.dataTable tr.even .sorting_1 { background-color: #a8a8a8; }
[/code]

To add darker than my current color shading but I still get the default purplish coloring on the selected column

Replies

  • dinotomdinotom Posts: 27Questions: 7Answers: 0
    solved my own issue, some setting has higher priority, so adding !important to my css made it work
  • dinotomdinotom Posts: 27Questions: 7Answers: 0
    edited April 2014
    Well, since I was adding a class to each alternating row, that gets lost when I sort(I've removed them now); Now that I can declare the alternating colors in the selected column how can i set them for the other unselected columns?
  • dinotomdinotom Posts: 27Questions: 7Answers: 0
    Found that answer too
    [code]
    table.dataTable tr.odd { background-color: #d3d3d3; }
    table.dataTable tr.even { background-color: #c7e4c7; }
    [/code]
This discussion has been closed.