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

  • SEARCH
  • Home
  • 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 8391175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:11:26+00:00 2026-06-09T19:11:26+00:00

I have this code that’s working only on Firefox and not all browsers, although

  • 0

I have this code that’s working only on Firefox and not all browsers, although :after works on the others too.

HTML:

<select>
    <option> select </option>
    <option class="red"> one </option>
    <option class="green"> two </option>
    <option class="blue"> three </option>
</select>​

CSS:

option:after {
    content: " ";
    height: 5px;
    width: 5px;
    border-radius: 5px;
    display: inline-block;
}

option.red:after { background: #c00; }
option.green:after { background: #0c0; }
option.blue:after { background: #00c; }

JS Fiddle: http://jsfiddle.net/abude/EAdvP/

  • 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-09T19:11:27+00:00Added an answer on June 9, 2026 at 7:11 pm

    Sorry, but most browsers do not give you many CSS possibilities for styling select and option elements. Firefox is quite lenient in this matter – others are not.

    I must tell you that in its current form, your code will not work cross-browser. You still have the option of substituting (by the use of Javascript) the select element with some stylable elements and make them act like a dropdown box. There are numerous libraries to do that.

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

Sidebar

Related Questions

I have this code that works although I would expect it to fail. The
I have this code that works in a unit test but doesn't work when
I have this code that works fine: FILE *fp; fp = fopen(filename.c_str(), rb); char
I have this code that works fine when I call it from within the
I have this code that creates the navigation for a slideshow. It works just
I have this code that won't delete all of my cookies, any idea y?
i Have this code that select all checkboxes: <html> <head> <script language=javascript> function checkAll(){
i have this code that shows an html message after the upload, but i
I have this code that works my @new = keys %h1; my @old =
I have this code that works from an .as file if (loaderInfo.loader) loaderInfo.loader.dispatchEvent(new Event(pageFinish,

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.