Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove dotted border/outline of focused dropdown menu

Tags:

css

How do you remove the dotted border/outline that is shown when selecting an item from a dropdown menu?

enter image description here

You can see there is a dotted border/outline shown, I want to remove this (screenshot taken in Firefox).

Trying the solution below did not remove it:

select:focus, option:focus, select::-moz-focus-inner, option::-moz-focus-inner {
    outline: none;
    border: none;
}

The HTML is just simply this:

<select name="order">
   <option value="desc">Newest to oldest</option>
   <option value="asc">Oldest to newest</option>
</select>
like image 927
MacMac Avatar asked Feb 02 '12 20:02

MacMac


People also ask

How do I get rid of the dotted border?

Select the cells from which you want to remove the dotted border. Click the Home tab. In the Font group, click on the 'Border' drop-down. In the border options that appear, click on 'No Border'

How do I remove the border from a drop down list in CSS?

Solution 1 You can use a css style like {border:0px}... quite enough to remove the border.


1 Answers

Add the following to your stylesheet. -

select:-moz-focusring { color: transparent;
                        text-shadow: 0 0 0 #000; }

Has always worked for me, hope it helps!

like image 119
typo Avatar answered Oct 11 '22 09:10

typo