views:

117

answers:

5

I want to buid a web page. The page contains a drop down which should look like this:

alt text

Is it possible using CSS or I would need to use a image with some javascipt?

A: 

Yes it's possible without Javascript as long as the dropdown is to open automatically when you move the mouse over the button. "Son of suckerfish" is a popular drop-down menu implementation with only minimal added Javascript for older browsers, I have never used it for a standalone button but it should be easy to achieve.

A click-sensitive dropdown can't, to my knowledge, be done using pure CSS.

Edit: on second reading, I'm not sure what exactly you mean. Are you talking about the hand-drawn look of the button, or the behaviour of a dropdown button?

Pekka
but i think he need to open drop down using click on arrow and sun of sucker fish works on mouse over
metal-gear-solid
I think he's looking for a drop down list (<select>) implementation rather than a drop down menu.
Lazarus
@Jitendra: you could use `:focus` for newer browsers and `:active` pseudo-class for <IE8 assuming the "select" element is a link.
Andy E
@Pekka: I did have added the UI tag to my question...!!
Manish
Unfortunately, javascript would be required to set the currently selected option.
Andy E
@Manish: Since when is drop down functionality not part of the UI?
Pekka
+2  A: 

You won't be able to style a select box like this. You have to make a custom one using JavaScript.

rahul
A: 

You would need to use a combination of CSS and javascript to create a custom select box. Unfortunately, elements aren't very stylable in most browsers.

EDIT

An example: http://lab.aspektas.com/select/select.html

Andy E
+1  A: 

You can make using this jquery plugin

http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/

metal-gear-solid
This looks good...but what if I need to bind the dropdown from code behind.
Manish
A: 

Take a look at these select menu's... sorry, but they do require jQuery & jQuery UI.

fudgey