View RSS Feed

molendijk

Long right side toggle menus and the ugliness of double scrollbars

Rate this Entry
All the right side toggle menus I've seen on the Internet show a vertical scrollbar appearing next to the vertical scrollbar of the window if both the page and the menu on it are long enough to have scrollbars. To take away this ugliness of double scroll bars appearing next to each other, we should make sure that the vertical scrollbar of a long right side toggle menu shows at the left side of the menu when the window has a vertical scrollbar too. When the window has no vertical scrollbar, the menu's scrollbar should have its default position at the right.

I wrote a script that handles these requirements. It knows when the window has a vertical scrollbar. It moves the menu button to a position immediately to the left of the menu's right side scrollbar when the window doesn't have one. As the correct position of the menu button is determined by the width of the menu's vertical scrollbar (the wider the scrollbar, the further the menu button must move to the left), the script contains lines that calculate the scrollbar's width for each individual browser.

Demo page here. (The page also has links to menus that are off-topic because they don't have right sided position. They may interest you though).

Submit "Long right side toggle menus and the ugliness of double scrollbars" to del.icio.us Submit "Long right side toggle menus and the ugliness of double scrollbars" to StumbleUpon Submit "Long right side toggle menus and the ugliness of double scrollbars" to Google Submit "Long right side toggle menus and the ugliness of double scrollbars" to Digg

Tags: None Add / Edit Tags
Categories
Uncategorized

Comments