Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I style an html select box to omit drop down arrow for print?

Tags:

css

I have an html select element which I would like to style for print so that it just looks like the selected text. How can I hide the drop down arrow?

like image 302
Tarquila Avatar asked Sep 17 '09 14:09

Tarquila


4 Answers

The below works for Firefox, Safari, Chrome and a few others

-moz-appearance: none;
-webkit-appearance: none;
appearance: none;

For IE support look at http://fetchak.com/ie-css3/

like image 110
Rowan Avatar answered Nov 01 '22 23:11

Rowan


You can't.

There is nothing in the standards that specifies that the select element has to have an arrow to indicate to the user that it has options to choose from, or how those options are shown. As those visual elements are not defined, there is naturally nothing defined for changing them.

You just have to display a different element when printing.

like image 25
Guffa Avatar answered Nov 01 '22 22:11

Guffa


In webkit you can specify:

-webkit-appearance: none;

Not sure about the other browsers.

like image 31
keegan3d Avatar answered Nov 01 '22 21:11

keegan3d


Try this

http://www.jankoatwarpspeed.com/post/2009/07/28/reinventing-drop-down-with-css-jquery.aspx

like image 27
Ramesh Avatar answered Nov 01 '22 23:11

Ramesh