...

View Full Version : style the box containing the options in a selectbox?



bitbob
12-01-2006, 08:52 AM
Is it possible? (What I want to do is to remove the border and the background color from the box containing the options in the picture)

http://seriespel.tennis.se/img/box.gif

ahallicks
12-01-2006, 05:02 PM
Try putting:

select {
background: none;
border: none;
}

or

option {
background: none;
border: none;
}

???

Arbitrator
12-01-2006, 07:02 PM
background: none;Wrong keyword there. You don’t want background-image: none; you want background-color: transparent. I suppose you could do both to account for more possibilities though: background: transparent none.

Based upon a test with Firefox 2, select { border-width: 0; background-color: transparent; } seems to work okay. However, while the background color and the outer border is removed, a one pixel‐wide white border remains. Internet Explorer 7 ignores attempts to style the select and option elements. Opera 9 allows removal of the border, but ignores the background-color declaration.

I use a custom theme for Windows XP, so that may have affected the results. In any case, you’re going to have limited control over how you can style form elements since they’re replaced elements.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum