views:

1670

answers:

3

By default the listbox in ASP.NET has a 3D border effect. I need to change that to Solid, 1 px, some color. Can this be done using css?

Thanks, Atul

A: 

You can give your ListBox control a CSS class and then use that to define the border you like in your stylesheet.

<asp:ListBox id="YourListBox" CssClass="SomeClassName" rows="3" runat="server" />
Thanks Dombenoit. I have already tried this option, but it does not seems to work for some reason.
Atul
A: 

I think that for ie, certain properties of the select tag are not styleable. Something to do with the rendering of it tied to the OS. Not sure about ie8.

Here is something that styles borders, but its involved:

http://v2.easy-designs.net/articles/replaceSelect/

Steve
A: 

Or you can use Asp.net Themes and Skins

Efe Kaptan