Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8767987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:57:24+00:00 2026-06-13T16:57:24+00:00

Here is my HTML: <select style=background-color:#e0f0f1> <option selected=selected>Select</option> <option class= value=one>One</option> <option class= value=two>Two</option>

  • 0

Here is my HTML:

<select style="background-color:#e0f0f1">
  <option selected="selected">Select</option>
  <option class="" value="one">One</option>
  <option class="" value="two">Two</option>
</select>

See this code in action

In IE and Opera, when you select an option, it is highlighted with a blue background colour. Firefox, Chrome and Safari don’t do this. Is there a way or trick to remove that blue highlight when the option is selected so that the original background colour is always shown?

If that’s not possible, is there a way to add a jQuery behaviour that simulates a click elsewhere on the page right after the option is selected? So basically when you click away from the selected option, the highlight disappears.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T16:57:25+00:00Added an answer on June 13, 2026 at 4:57 pm

    I think I found a solution to this. Perhaps not a very clean solution but this trick works.

    I’ve tested it in Firefox, Chrome, Safari, Opera and IE 9. Works on all of them but does not work on older versions of IE (6 and 7). Haven’t tested in IE8. If someone can test it on Mac and let me know if this works, that’ll be great.

    I added an input field with width and height as 0 and shifting focus to it when an option is clicked. Using display:none and visibility:hidden in the input field does not work. So you will have hide the input field somewhere in the corner or using z-index to move it behind a container might work too (but haven’t tried this). If anyone has a better solution, let me know.

    HTML:

     `<select style="background-color:#e0f0f1">
        <option selected="selected">Select</option>
        <option class="" value="one">One</option>
        <option class="" value="two">Two</option>
      </select>
      <input type="text" id="abc" style="width:0; height:0;" />`
    

    jQuery:

    $(document).ready(function(){
      $('select option').on('click', function() { $('#abc').focus(); });
    });
    

    See this in Fiddle

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A sample of the HTML snippet is here: <select name=paytitle id=paytitle> <option value=Budget Keeper
Here is my HTML: <tr> <td colspan=2 class=borderBottomCell> <div class=benefitInfo style=WIDTH: 99%! important;> <asp:DropDownList
I've prepared a fiddle here: http://jsfiddle.net/zakbx/4/ HTML <!-- filters --> <ul class=blog-detail-dropdown> <li>Select category
Consider the following example: ( live demo here ) HTML: <div class=board> <div class=row>
Fiddle is here - http://jsfiddle.net/ashwyn/a45ha/ HTML here - <div class=parent> <div class=a>Class A</div> <div
I have html like so: <div class=foo> (<a href=forum.example.com>forum</a>) <p> Some html here.... </div>
Here is my HTML: <div id=leftMenuWrapper> <div id=ramps class=leftMenuHeaderButton></div> <div id=carServiceRamps class=leftMenuSubButton></div> <div class=clear></div>
Here is my HTML: <li> <div class=menu_inner> <a href=#> <div class=button><img class=486 src=images/portalbutton.png /></div>
Here's my HTML. Apologies for formatting - this is my first-ever question! <div id=Template>
I have an html select and a add button. If any one click on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.