Permalink
Browse files

sidebar fixed on scroll

  • Loading branch information...
1 parent 71d7612 commit 431787059d1a61181dc6cb9b3f63edd6a8a2be90 Cody Baker committed Jul 2, 2012
Showing with 51 additions and 14 deletions.
  1. +4 −2 _layouts/default.html
  2. +19 −11 css/global.css
  3. +28 −1 js/application.js
@@ -24,8 +24,8 @@
{% include subnav.html %}
<div class="content-container docs">
-
- <div id="sidemenu">
+ <nav class="sidebar-nav">
+ <div class="sidebar-content">
<form action="/search">
<input type="text" name="q" id="q" placeholder="Search Dev Center" size="18" />
</form>
@@ -53,6 +53,8 @@
</p>
{% endif %}
</div>
+ </nav>
+
<div style="float: right; width: 700px" class="content">
{{ content }}
View
@@ -150,59 +150,67 @@ input:-moz-placeholder {
/*--------------------------------- SIDE MENU ------------------------------------*/
-#sidemenu {
+nav.sidebar-nav,
+.sidebar-content {
+ position:relative;
width: 210px;
float: left;
- margin:20px 0px 0 0;
+ margin:11px 0 0 0;
+ padding:0 0 30px;
+}
+.sidebar-content.pinned {
+ position: fixed;
+ top: 0px;
+ padding-top: 0px !important;
}
#sidemenu-links {
max-height:400px;
min-height:400px;
}
-#sidemenu a, #sidemenu a:hover {
+.sidebar-content a, .sidebar-content a:hover {
text-decoration: none;
width: 190px;
display: block;
font-size: 14px;
}
-#sidemenu a:hover {
+.sidebar-content a:hover {
background-color: #DDD;
}
-#sidemenu ul li {
+.sidebar-content ul li {
margin: 0;
}
-#sidemenu ul li a {
+.sidebar-content ul li a {
padding: 0 0 0 16px;
}
-#sidemenu a.selected {
+.sidebar-content a.selected {
color: #000000;
background-color: #DDD;
font-weight: bold;
}
-#sidemenu h4 a, #sidemenu h4 a:hover{
+.sidebar-content h4 a, .sidebar-content h4 a:hover{
font-size: 16px;
padding: 0 0 0 5px;
margin: 0;
}
-#sidemenu h4 {
+.sidebar-content h4 {
margin: 10px 0 3px 0;
padding: 0;
}
-#sidemenu ul {
+.sidebar-content ul {
list-style-type: none;
padding: 0;
margin: 0;
}
-#sidemenu form {
+.sidebar-content form {
margin: 0 0 10px;
}
.sidemenu-box {
Oops, something went wrong.

0 comments on commit 4317870

Please sign in to comment.