Extension:CSS Dropdowns

Michael180 has developed CSS based drop-downs for MediaWiki to live in the Sitenotice (the area at the top of the page) They are pure CSS (no javascript!!) and work in IE7 and Gecko based browsers like Firefox. In addition the edges are rounded in Gecko based browsers.

This is how I built, and how you can implement my pure CSS dropdowns in the Sitenotice of MediaWiki This is supported only in modern browsers like Internet Explorer 7 and Firefox. Sorry, but no support for IE6, due to its bad CSS support. Remember these are pure CSS menus, no Javascript needed.

In addition, in Gecko based browsers like Firefox the edges appear rounded. In other browsers, the box appears, well boxy.

Introduction
The pull down menu is written in MediaWiki:Sitenotice. The site notice (and the MediaWiki:Anonnotice when not logged in) is a space to put messages that you want on every page on your site. The [Wikimedia Foundation uses it to announce elections and stuff, but I configured it to add the drop downs. I coded most of it by hand, copying parts from the Stylin' with CSS Book (A really good book, I highly recommend it to CSS beginners, as well as The Zen of CSS Design)

It is pure CSS, meaning it works without JavaScript, a plus, but does not work in IE6. I am trying to find a way to fix that. (I am not going to try to make it work in IE6.) In dumb browsers, only the top level appears, so users can click to directed to another page, but no dropdowning, meaning it degrades nicely. Also a plus, non-CSS browsers can see all of the links in a normal unordered list. Unfortunately they will need to scroll by these on every page, making it a pain to be using really old browsers (Netscape 4.x and text-only ones, for example) as well as most cell-phones.

Adding it to your site
You need the CSS from http://theplaz.com/wiki/skins/common/dropdown/drop_down_menus.css to power the menus. Add this to MediaWiki:Common.css. On my site, I do it a bit differently, but copying it to there should work. (If not, send me a message)

To call the dropdowns, copy this to your MediaWiki:Sitenotice  Template:Drop Down:Pizza Template:Drop Down:Ice Cream  Make the pages Template:Drop Down:Pizza and Template:Drop Down:Ice Cream. On those pages use this format for your links.
 * Cheese
 * Pepperoni

You should now have a drop down where the top level links to the list page for IE users and drop downs for Firefox users. To add more links just edit Template:Drop Down:Pizza. To add more drop downs, edit MediaWiki:Sitenotice, and add a  line like the example above.

You can also edit the CSS to change colors or shapes or add pictures.