Revision history [back]

click to hide/show revision 1
initial version

answered 2021-03-09 14:24:46 +0800

cor3000 gravatar image cor3000

ZK Team

since you didn't mention which theme you're using (maybe a custom theme?) I used the default themes to test this (breeze and iceblue/_c)

Here a zkfiddle showing the problem happens in both 8.6.3.1 and the latest 9.5.1 (also with different themes) https://zkfiddle.org/sample/1q65jls/1-listitem-background-color

The background color is always defined by the css rule in zk.wcs:

.z-listitem .z-listcell {
  background: #FFFFFF;
}

If you specify a background-color at listitem level it will just be hidden by the cell background color.

In order to reset the listcell background you can add the following style:

.z-listitem .z-listcell {
   background-color: initial;
}

as shown in this example:

https://zkfiddle.org/sample/1q65jls/2-listitem-background-color

since you didn't mention which theme you're using (maybe a custom theme?) I used the default themes to test this (breeze and iceblue/_c)

Here a zkfiddle showing the problem happens in both 8.6.3.1 and the latest 9.5.1 (also with different themes) https://zkfiddle.org/sample/1q65jls/1-listitem-background-color

The background color is always defined by the css rule in zk.wcs:

.z-listitem .z-listcell {
  background: #FFFFFF;
}

If you specify a background-color at listitem level it will just be hidden by the cell background color.

In order to reset the listcell background you can add the following style:

.z-listitem .z-listcell {
   background-color: initial;
}

as shown in this example:

https://zkfiddle.org/sample/1q65jls/2-listitem-background-color

However this can't explain why this has worked before in your application. (I could imagine a custom theme, or additional style overrides that no longer apply in the same way as before - this will become obvious when looking into the browser's developer tools and compare the styles before and after upgrading). Those make it easy to analyse which styles apply to which elements and in which order.

(If you still have questions and can't share the full details in public, please contact our support)

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More