Can we write custom dropdown box using javascript,html,css. and also placing backgroung-image for that.
any sample example
Can we write custom dropdown box using javascript,html,css. and also placing backgroung-image for that.
any sample example
Yes you can create a custom dropdown box like element.
You can use a div for this purpose and set the background-image property for that div.
You can add ul as menu items. Nut you have to write code for event like mouseclick, mouseover, mouseout, keydown etc
yes you can. with css it goes like this.
add couple of class to your css page, like this:
.cmdUnbelievable
{
width:200px;
font-family:Trebuchet MS;
background-color:#0b5925;
color:#d4d5d4;
border:dashed 2px #f2f2f2;
}
.cmdUnbelievable option
{
color:#f2f2f2;
border-bottom:solid 0px white;
border:dashed 2px #f2f2f2;
margin-left:15px;
}
then give a class to your select box :
<select class="cmdUnbelievable">
<option>We are</option>
<option>the knights</option>
<option>who say Ni.</option>
</select>