Forum Samples, Tips and Tricks

better rendering of select element

jeric
Hi all,

I needed to mimic the appearance of a select element in a browser, the following css takes care of that (and it also provides a default background / font color for all input elements).

input, select 
{
  background-color: white; 
  color: black;
}
        
option:first-of-type:after 
{ 
  content: "\25bc"; 
  background-color: #dcdad5; 
  border: 1px outset #dcdad5; 
  display: table-cell;
}