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 8474675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:41:31+00:00 2026-06-10T17:41:31+00:00

I’m trying to get rid of the default select to use something more aligned

  • 0

I’m trying to get rid of the default select to use something more aligned to the style of my site.

I created a <button> to wrap the select. Gave it opacity: 0 and absolute positioning and sizing to make it fit the button. With some jquery i made it so that the active option appears also as the text of the button, in a <span>. It looks pretty nice.

The problem is that on chrome and safari works perfectly, on firefox instead quite not!

webkit listen to the click on the select even if it’s not visible, moz don’t (pretty curious about IE and opera). I really don’t know how to solve this…

Here a fiddle with a reproduction of the problem:
http://jsfiddle.net/bakaburg1/YyvRf/2/

Any help is welcome.

  • 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-10T17:41:32+00:00Added an answer on June 10, 2026 at 5:41 pm

    You can use <div> instead of <button>

    HTML:

    <div class="btn btn-small select-container">
        <select>
            <option>title</option>
            <option>date</option>
            <option>author</option>
        </select>
    </div>
    

    CSS:

    .btn.btn-small{
      padding-bottom: 2px;
      padding-top: 2px;
      color: #737373;
      font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
      font-size: 14px !important;
      font-variant: small-caps;
      font-weight: bold;
    }
    
    .btn.select-container {
      position: relative;
      padding-right: 24px;
    }
    
    .btn.select-container select {
      position: absolute;
      top: -1px;
      left: 0;
      height: 117%;
      width: 100%;
      opacity: 0;
      filter: alpha(opacity=0);
      z-index: 1000;
    }
    
    select.btn {
      width: initial;
      height: 23px;
      padding-right: 20px;
      -webkit-appearance: none;
    }
    
    select.btn:focus {
      outline: none;
    }
    
    .select-container {
      position: relative;
    }
    

    See it here: http://jsfiddle.net/YyvRf/3/

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to select an H1 element which is the second-child in its group
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
In my XML file chapters tag has more chapter tag.i need to display chapters

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.