0

I have tried it by putting it in class then edit through by accessing the class I've also tried optgrp but that didn't worked either.

Please see my code below

<style>
select {
    width: 300px; 
    margin: 10px; 

font-size:10px;
border:0; 
-webkit-appearance: none;
}

select:focus {
    min-width: 300px;
    width: 300px;
}       

</style>
<label for="Department">Choose a Department:</label>
<select name="Select Department" onchange="location = this.value;">

<option value="#">All Departments</option>
<option value="#">Cardiology</option>
<option value="#">Plastic, Cosmatic & Reconstrustive Surgery</option>
<option value="#">Dentistry</option>


</select>
aynber
  • 22,380
  • 8
  • 50
  • 63

1 Answers1

3

Try this..

<style>
.drpdwn-style{
    width: 300px; 
    margin: 10px; 

font-size:10px;
border:0; 
-webkit-appearance: none;
}  
</style>
<label for="Department">Choose a Department:</label>
<select name="Select Department" class= "drpdwn-style" onchange="location = this.value;">
<option value="#">All Departments</option>
<option value="#">Cardiology</option>
<option value="#">Plastic, Cosmatic & Reconstrustive Surgery</option>
<option value="#">Dentistry</option>
</select>
shweta ramani
  • 382
  • 4
  • 6