CSS style precedence not working as expected

前端 未结 2 884
不知归路
不知归路 2021-01-20 22:46

I have two styles, each declared in its separate 3rd party control that don\'t play well together and I\'m not even sure why that is - and ultimately - how to make them work

2条回答
  •  庸人自扰
    2021-01-20 23:02

    You have to be more specific since both the rules are applied to your td. You can do it like this:

    .myrow>td {
          background-color: #88f;
     }
    .myrow>td.ui-state-error {
          background-color: #f00;
     }
    

    Here is the Updated Fiddle

提交回复
热议问题