Web 2.0 WebListBox removing alternate row shading

I know there are already a bunch of threads about removing the alternate row shading from a Web 2.0 WebListBox and I think I’ve tried all the techniques in every one of them without success. Most seem to involve a CSS override in the App object’s HTML Header property.

I didn’t want to bump an old thread so I’m just here to ask if anybody has found the definitive answer on this?

This is the code that creates the alternate row shading:

<style>
.XojoListBox table.dataTable.table-striped>tbody>tr:nth-child(odd)>* {
    box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.05);
}
.XojoListBox table.dataTable.table-dark.table-striped>tbody>tr:nth-child(odd)>* {
    box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, 0.05);
}
</style>

You can just change the 0.05 to 0.0 or change the inset to none like this:

<style>
.XojoListBox table.dataTable.table-striped>tbody>tr:nth-child(odd)>* {
    box-shadow: none;
}
.XojoListBox table.dataTable.table-dark.table-striped>tbody>tr:nth-child(odd)>* {
    box-shadow: none;
}
</style>

App HTML Header.

Edit: I guess you want a solution for Xojo 2025r2.1 (only tested with 2025r1.1 and r2.1)

2 Likes

Thank you @AlbertoD !