PDA

View Full Version : Adding scrollbar to CSS Dropdown Menu



protohippy
10-31-2006, 08:25 PM
I want to use the chrome drop down menu script, but would like to add a scrollbar to the side of each menu so that lets say there are 100 entries into the menu, that it would only display say 15 of them, but have a scrollbar so that you can scroll down and see/click the rest of the menu items. Any help out there??

ddadmin
10-31-2006, 11:33 PM
Warning: Please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

You could use CSS's overflow property in combination with the height property on the drop down menu to add a scrollbar. Inside chrome.css for example, make the following change:


.dropmenudiv{
"
"
height: 300px;
max-height: 300px;
overflow-y: scroll;
}

Note that overflow-y is not supported in earlier versions of Firefox, so you may want to resort to using overflow instead.