Dropdowns

From CSS Standards FAQ

Jump to: navigation, search

The best way to do dropdowns is a discussed issue. In any case you'll have to use javascript, but some think it's behaviour and some argue it's presentational. Those who say it's presentational use the :hover pseudo class to achieve the dropdown, and of course have to use javascript, because IE doesn't support :hover one anything besides <a>, which they wrap in conditional comments to filter the javascript out for none IE browsers. If we however think about backwards compatibility the best thing might be to use only javascript, but remember to provide a backup solution for those who have javascript disabled. If you use CSS to do dropdowns, you don't really have any options for the browsers that doesn't support :hover, besides IE.

Further Reading

Personal tools