Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 3rd, 2004, 09:07 AM
Authorized User
 
Join Date: Oct 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default border color on <select>

Hi,
Someone know if I can get another color on the border to a <select> list I want it to be black and the V to be ligt grey, Is it possible in ASP?
Tried this but it don´t work!

Code:
<SELECT NAME="table_name" style="background:white;color:BLACK;font-family:arial, verdana; font-size:10px;width=135px;height:18px; font-color:grey; bordercolor:black">

 
Old November 3rd, 2004, 02:33 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi cilla,

Unfortunately not; you cannot change the border of the select list, nor change the color of the arrow (the latter is a OS theme setting).

The closest workaround I have come across (other than completely rebuilding your own drop-down in JavaScript) is to add a border around a container element like a <span> tag:

<span style="border:1px solid red;"><select ......></span>

You can, however, influence individual <option> elements. The following code creates a zebra list:
Code:
<select>
  <option style="background-color:#000;color:#fff">Option 1</option>
  <option style="background-color:#fff;color:#000">Option 2</option>
  <option style="background-color:#000;color:#fff">Option 3</option>
  <option style="background-color:#fff;color:#000">Option 4</option>
</select>
It's not as good as complete control through the style attribute for the <select> list, but it might be something....

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Lateralus by Tool (Track 9 from the album: Lateralus) What's This?





Similar Threads
Thread Thread Starter Forum Replies Last Post
change the text color of (<xsl:value-of select="De ismailc XSLT 2 August 25th, 2008 07:25 AM
line IN BETWEEN <td> cells (no border)? crmpicco HTML Code Clinic 2 August 31st, 2005 08:24 AM
HELP: XSL -> HTML <select selected=true> jedbartlett XSLT 4 October 7th, 2004 11:16 PM
line-height -n- background-color with <DIV> block anshul HTML Code Clinic 11 September 5th, 2004 02:15 PM
color attribute with <li> econophil HTML Code Clinic 2 August 31st, 2004 02:22 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.