kobe
kobe

Reputation: 15835

Is it possible to do a dropdown menu without Javascript or Jquery

We have a requirement not to use javascript for dropdown menus. This requirement is due to maitain SEO value.

Is there any way to achieve this with purely css and make it work on all browsers.

I tried with li mouseover and mouseout , but its not working in IE7. its working only in Firefox.

Can you please advice or give directions on good solution.

thanks

Upvotes: 5

Views: 5122

Answers (4)

Alex Rashkov
Alex Rashkov

Reputation: 10015

You can do it just with CSS

#item {
    display: none;
}

#item:hover {
    display: block
}

Also have a look here:

http://lwis.net/free-css-drop-down-menu/

You might face an issue with IE6 for hover over HTML element different of so you can use this hack/fix

http://www.xs4all.nl/~peterned/csshover.html

I tested this: http://lwis.net/free-css-drop-down-menu/dropdown.simple.horizontal.html

works under IE 6/7/8, tested with IETester

Upvotes: 4

Michael B.
Michael B.

Reputation: 3430

Maybe this would work for you

http://www.cssplay.co.uk/menus/final_drop.html

Upvotes: 3

dotariel
dotariel

Reputation: 1604

What about plain HTML?

<select name="myDropdown">
  <option value="1">Option 1</option>
  <option value="2">Option 2</option>
</select>

Upvotes: 2

Related Questions