...

View Full Version : Reverse Dropdown Boxes?



Rioteer
05-12-2009, 03:56 PM
I am a beginner at this designing-with-JavaScript business and would like to create reverse dropdown boxes (that is, dropdown boxes that "drop" the other way around--perhaps "drop-up" boxes could be the closest term I could associate with such elements) for the menu of my personal site; I've seen such menus before, however at the same time I have also neglected to take note of what JavaScripts were used. Is there any particular script you could recommend to me in order for me to be able to achieve this effect, or a method you would suggest?

abduraooft
05-13-2009, 09:28 AM
First of all, relying completely on javascript for making a menu is not a good idea, since such menu can have some drawbacks like, they can't be accessible in the absence of javascript support in user's browsers. Also, search engines won't crawl the links made by javascript.

So, I'd recommend a CSS based one, such as the one described at http://htmldog.com/articles/suckerfish/dropdowns/

Now, it's very easy to change the direction of the sub menu. Say, if you wanna make the sample dropdown menu at http://htmldog.com/articles/suckerfish/dropdowns/example/bones2.html, to a "dropup" menu, just adjust the CSS like

#nav li {/*bones2.html (line 26)*/
float:left;
position:relative;
width:10em;
}
#nav li ul {/*bones2.html (line 31)*/
background:orange none repeat scroll 0;
bottom:1em;
left:-999em;
position:absolute;
width:10em;
}
(some fine tuning may also be required)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum