473,385 Members | 1,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

how to change the select box option hover background color chage?

how to change the select box option hover background color chage?

in this the background color default is blue so i do this color is white
Aug 19 '15 #1
1 14273
Sherin
77 64KB
Try This Code

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html>
  2.  
  3. <html>
  4.     <head>
  5.     <style>
  6.     option:hover{background-color:yellow;}
  7.     </style>
  8.     </head>
  9.     <body>
  10.     <select onfocus='this.size=10;' onblur='this.size=0;' 
  11.             onchange='this.size=1; this.blur();'>
  12.       <option value="volvo">Volvo</option>
  13.       <option value="saab">Saab</option>
  14.       <option value="opel">Opel</option>
  15.       <option value="audi">Audi</option>
  16.         <option value="volvo">Volvo</option>
  17.       <option value="saab">Saab</option>
  18.       <option value="opel">Opel</option>
  19.       <option value="audi">Audi</option>
  20.         <option value="volvo">Volvo</option>
  21.       <option value="saab">Saab</option>
  22.       <option value="opel">Opel</option>
  23.       <option value="audi">Audi</option>
  24.         <option value="volvo">Volvo</option>
  25.       <option value="saab">Saab</option>
  26.       <option value="opel">Opel</option>
  27.       <option value="audi">Audi</option>
  28.     </select>
  29.  
  30.     </body>
  31.     </html>
Jun 9 '20 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Jeff Anderson | last post by:
Is there a style for a select option's "selected" color? For example: <HTML> <BODY> <FORM NAME="form1"> <SELECT NAME="mySelect" SIZE="7" style="background-color:red;"> <OPTION>Test 1...
4
by: Rolf Brauser | last post by:
Hi, I canīt manage to change the a.hover text color on Mac IE or Safari browsers .. If I attache textdecoration for example it matches. why is that ? ...
1
by: Michael | last post by:
How can I use onclick to change a table cell background color. I know I can use this.className=? to change the classname. But then I would have to put the code into every single table cell. I...
13
by: Gary | last post by:
I have a table with a form consisting of several checkboxes and I'm wondering if its possible to change the table row background color on mouseover or hover and make it stay that color when the...
0
by: Tom | last post by:
Hi I have a ListBox control of my asp.net web page. I want to set the value of the style property of the ListItem to a specific background color. I have tried this but no success: //li is...
4
by: Bastardx | last post by:
Hi Can I change newsContainer background color with mousover in following example of my code? <div class="newsContainer"><div class="newsTitle><a href="#">My news title</a></div> <div...
1
by: Mel | last post by:
i need to display background of gray for all disabled form inputs can you please help me ? thanks a whole bunch
8
by: Bosconian | last post by:
I have two multiple select inputs. Initially the first contains a bunch of items and the second is empty. Using a common method, I move items back and forth by double clicking on them. This...
3
by: shapper | last post by:
Hello, Could someone, please, tell me how to change the background color of div when the mouse is hover it? Thanks, Miguel
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.