From 4585d61d6a9f0ada53ee80e94bc804b851280a47 Mon Sep 17 00:00:00 2001 From: spez Date: Sat, 8 Nov 2008 14:59:54 -0800 Subject: [PATCH] attempt to fix some rendering issues in opera. because opera doesn't handle position: absolutel properly, there are still issues with the dropdown in the top bar --- r2/r2/public/static/reddit.css | 7 +++---- r2/r2/public/static/reddit_piece.js | 4 ++-- r2/r2/templates/navmenu.html | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/r2/r2/public/static/reddit.css b/r2/r2/public/static/reddit.css index b71fe7be0..a91645529 100644 --- a/r2/r2/public/static/reddit.css +++ b/r2/r2/public/static/reddit.css @@ -131,9 +131,9 @@ input[type=checkbox], input[type=radio] { margin-top: .4em; } } .dropdown { - position: relative; cursor: default; display: inline; + position: relative; } .dropdown-title { @@ -142,14 +142,12 @@ input[type=checkbox], input[type=radio] { margin-top: .4em; } .drop-choices { position: absolute; left: 0px; /* top gets set in js */ - visibility: hidden; border: 1px solid gray; z-index: 100; background-color: white; white-space: nowrap; line-height: normal; margin-top: 1px; - display: inline; } .drop-choices a.choice { @@ -1637,7 +1635,7 @@ ul#image-preview-list .description pre { } #sr-header-area { - padding: 3px 0; + padding: 3px 0px; background-color: #369; white-space: nowrap; overflow: hidden; @@ -1673,6 +1671,7 @@ ul#image-preview-list .description pre { background-color: #369; position: absolute; right: 0px; + top: 3px; padding: 0 5px 0 15px; font-weight: bold; margin: 0 1px; diff --git a/r2/r2/public/static/reddit_piece.js b/r2/r2/public/static/reddit_piece.js index 768055e6a..f560d263e 100644 --- a/r2/r2/public/static/reddit_piece.js +++ b/r2/r2/public/static/reddit_piece.js @@ -6,7 +6,7 @@ function open_menu(menu) { var child = menu.nextSibling; if (child.className.indexOf("drop-choices") == -1) return; - child.style.visibility = 'visible'; + show(child); child.style.top = (menu.offsetTop + menu.offsetHeight) + 'px'; child.style.left = menu.offsetLeft + 'px'; @@ -21,7 +21,7 @@ function close_menus() { var ul = uls[i]; var menu = ul.previousSibling; if (menu != cur_menu && ul.className.indexOf('drop-choices') > -1) { - ul.style.visibility = 'hidden'; + hide(ul); menu.onclick = function() { return open_menu(this); } diff --git a/r2/r2/templates/navmenu.html b/r2/r2/templates/navmenu.html index 2213fc6bf..23c21e076 100644 --- a/r2/r2/templates/navmenu.html +++ b/r2/r2/templates/navmenu.html @@ -41,7 +41,7 @@ %endif -
+