aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes ListBox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "ListBox" Watch "ListBox" New topic
Author

ListBox

meena latha
Ranch Hand

Joined: Jan 24, 2005
Posts: 219
Hi all

I need to change the default color(blue) of the listBox to brown color.
Anybody can help me out with code or some links.

Thanks in advance
A.Ramya.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61426
    
  67

Which color? The background? The text?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
meena latha
Ranch Hand

Joined: Jan 24, 2005
Posts: 219
I need to change the border color(blue which is default) of the text box that appears with the dropdown arrow to brown color.

Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61426
    
  67

Have you tried setting the border attirbutes of the elements via CSS? If that doesn't do it for you, it's unlikely you are going to be able to adjust the appearance to your desires.
meena latha
Ranch Hand

Joined: Jan 24, 2005
Posts: 219
thanks bear .....I am not able to do that using CSS.
I read in one forum that it is not possible to set the border of listBox especially in IE browsers.But what to know whether there is any other alternative to do this,like by using javascript

Thanks
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
JavaScript has no control just like CSS has no control.

You can apply styles to the options themselves also so that might be something else you want to try to play with.

Eric
meena latha
Ranch Hand

Joined: Jan 24, 2005
Posts: 219
i am not sure how to do that.Can u give a sample code for applying style attribute to select.

Thanks in advace.
 
wood burning stoves
 
subject: ListBox