-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello community,
I need help on using CSS for listboxes and listitems.
The problem is that the background-color of selected odd listitems will never change to white (#FFFFFF). The background-color of the selected odd item will always be overwritten by style tr.z-listbox-odd.
I had no problems with version 3.6
Here my style definitions:
div.z-listbox { border: 1px solid #B3B3B3; background-color: #F2F2F2; color: Black; } tr.z-listitem, tr.z-listitem a, tr.z-listitem a:visited { background-color: #F2F2F2; font-size:10px; font-weight: normal; color: black; text-decoration: none; } tr.z-listbox-odd { background-color: #F2F2F2; } tr.z-listitem-seld { background-color: #FFFFFF; Color: #CC0000; border: 1px solid #666666; }
Thank you!
Regards,
Lapster
Hey Lapster,
Have you tried this on ZK 5.0.1?
Hey Lapster,
I have tested your code and cannot replicate the issue using ZK 5.0.1. Here is the test code I used:
<?page title="new page title" contentType="text/html;charset=UTF-8"?> <zk> <style> div.z-listbox { border: 1px solid #B3B3B3; background-color: #F2F2F2; color: Black; } tr.z-listitem, tr.z-listitem a, tr.z-listitem a:visited { background-color: #F2F2F2; font-size:10px; font-weight: normal; color: black; text-decoration: none; } tr.z-listbox-odd { background-color: #F2F2F2; } tr.z-listitem-seld { background-color: #FFFFFF; Color: #CC0000; border: 1px solid #666666; } </style> <window title="new page title" border="normal"> <listbox> <listhead> <listheader label="Test" sort="auto" /> <listheader label="Test" sort="auto" /> </listhead> <listitem> <listcell label="Blah 1" /> <listcell label="Blah 1" /> </listitem> <listitem> <listcell label="Blah 2" /> <listcell label="Blah 2" /> </listitem> <listitem> <listcell label="Blah 3" /> <listcell label="Blah 3" /> </listitem> <listitem> <listcell label="Blah 4" /> <listcell label="Blah 4" /> </listitem> </listbox> </window> </zk>
Can you provide me with some code to replicate this issue? What browser are you using? I have tested with the following:
Firefox: 3.5.8
IE: 8.0
Chrome: 4.1
Hi Diego898
I am just wondering whether you have got the solution for changing the background color of certain rows.
If so, can you give some idea on that
Asked: 2010-03-19 09:06:01 +0800
Seen: 1,008 times
Last updated: Jun 09 '12