Using jQuery to Create a Fixed Sidebar - CSS - style.css


/ Published in: CSS
Save to your folder(s)



Copy this code and paste it in your HTML
  1. ul, li, h1 {
  2. margin: 0;
  3. padding: 0;
  4. }
  5.  
  6. #wrapper {
  7. margin: 400px 0 0 0;
  8. }
  9.  
  10. #left {
  11. width: 220px;
  12. float: left;
  13. }
  14.  
  15. #right {
  16. margin: 0 0 0 220px;
  17. background: gray;
  18. }
  19.  
  20. #leftNav {
  21. background: green;
  22. width: 220px;
  23. }
  24.  
  25. .fixed {
  26. position: fixed;
  27. top: 0;
  28. }

URL: www.josephgiuffrida.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.