You can set the background colors from the .aspx page by specifying the CssClass or BackColor property .. it looks like this:
<asp:ListBox CssClass="MyListBox" BackColor="#e0e0e0"></asp:ListBox>
Customizing the selected item is a bit more complicated ... I do not believe there is an attribute for this. You can install it in javascript or jQuery, for example:
<script type="text/javascript">
$(document).ready(function() {
$('#MyListBox').click(function() {
$("#MyListBox option:selected").css("background-color", "#e0e0e0");
});
});
</script>
, , ... JavaScript, , . jQuery, , :)
Justin script!
:
select > option:hover {
background-color: #ffffd0;
}
, . jQuery , #MyListBox... ,
UPDATE
, , , , , , : .
jQuery, , . .
, : hover -
: (
.