Permalink
Browse files

Fixing scrollbar issues.

  • Loading branch information...
1 parent b6d36a6 commit bbb77cbde2086571124a623de613526290aba52a @simonwex simonwex committed Aug 21, 2012
Showing with 22 additions and 5 deletions.
  1. +13 −5 app/http/public/stylesheets/sidebar.css
  2. +9 −0 app/http/views/social/sidebar.ejs
@@ -1,5 +1,5 @@
html, body {
-
+ overflow: hidden;
}
body.anonymous {
@@ -81,10 +81,10 @@ body.authenticated #ui {
.feed {
margin-top: 27px;
- height: 400px;
- overflow-y: auto;
+ overflow-y: scroll;
overflow-x: hidden;
-
+ clear: both;
+ height: 400px;
}
ul {
margin: 0;
@@ -127,12 +127,20 @@ span svg {
}
.contacts {
- overflow-y: auto;
+ overflow-y: scroll;
overflow-x: hidden;
+ clear: both;
+ height: 400px;
+}
+
+.contacts ul {
+ margin: 0;
+ margin-top: 27px;
}
.contacts .header {
background-color: #2c2c2c;
+ position: fixed;
margin: 0;
padding: 4px 0 5px 0;
width: 100%;
@@ -183,11 +183,20 @@
dump("Sidebar initialized.\n");
}
+ function resizeSidebarPanes(){
+ var halfHeight = Math.floor($(window).height() / 2);
+ $('.feed').height(halfHeight);
+ $('.contacts').height(halfHeight);
+ }
+
+ $(window).resize(resizeSidebarPanes);
+
$(function(){
// If user is logged in.
if (<%= (user != null) %>){
$('body').addClass('authenticated');
init();
+ resizeSidebarPanes();
}
else{
$('body').addClass('anonymous');

0 comments on commit bbb77cb

Please sign in to comment.