Advertisement
LN12

Fixed Nav

May 9th, 2016
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. HTML:
  2. <!DOCTYPE html>
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <title>Drones</title>
  6. <meta charset="utf-8">
  7. <meta name="viewport" content="width=device-width, initial-scale=1">
  8. <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
  9. <link href='https://fonts.googleapis.com/css?family=Cuprum:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
  10. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  11. <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
  12. <script src="btt index.js"></script>
  13. <link rel="stylesheet" href="indexCSS.css" />
  14. <h1 id="TITLE" class="text-center"> Kittatinny's Drone Information</h1>
  15. <nav class="fixed-nav-bar">
  16. <ul id="nav">
  17. <li><a href="index.html">Home</a></li>
  18. <li><a href="What Are Drones.html">What Are Drones</a></li>
  19. <li><a href="How Drones Work.html">How Drones Work</a></li>
  20. <li><a href="Buying a Drone.html">Buying a Drone</a></li>
  21. <li><a href="About Us.html">About Us</a></li>
  22. </ul>
  23. </nav>
  24. </head>
  25.  
  26. CSS:
  27. @charset "utf-8";
  28. /* CSS Document */
  29. #TITLE {color: #1762a1; font-family: "Cuprum", sans-serif; font-size:80px;}
  30. body { background:#393939}
  31. /*Menu for Navigation (Duh)*/
  32. #nav { list-style-type: none; height: 100px; padding: 0; margin: 0; }
  33. #nav {text-align:center;}
  34. #nav { list-style-type: none; height: 100px; padding: 0; margin: 0; }
  35. #nav li { display:inline-block; position: relative; padding: 0; line-height: 100px; background: #393939 url(nav-bg.png) repeat-x 0 0; }
  36. #nav li:hover { background-position: 0 -40px; }
  37. #nav li a { display: block; padding: 0 15px; color: #fff; text-decoration: none; font-size: 40px; font-family: 'Cuprum', sans-serif; }
  38. #nav li a:hover { color:#0F0 }
  39. #nav li ul { opacity: 0; position: absolute; left: 0; width: 8em; background: #63867f; list-style-type: none; padding: 0; margin: 0; }
  40. #nav li:hover ul { opacity: 1; }
  41. #nav li ul li { float: none; position: static; height: 0; line-height: 0; background: none; }
  42. #nav li:hover ul li { height: 30px; line-height: 30px; }
  43. #nav li ul li a { background:#393939 }
  44. #nav li ul li a:hover { background:#393939 }
  45.  
  46. .fixed-nav-bar {
  47. position: fixed;
  48. top: 0;
  49. left: 0;
  50. z-index: 9999;
  51. width: 100%;
  52. height: 50px;
  53. background-color: #393939;
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement