Guest User

Untitled

a guest
Aug 1st, 2015
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 2.61 KB | None | 0 0
  1. .main-navigation {
  2.     background: #fff;
  3.     border: 2px solid #333;
  4.     border-radius: 3px;
  5.     clip: auto !important;
  6.     color: #000;
  7.     display: block;
  8.     font-size: 12px;
  9.     padding: 12px;
  10.     position: absolute;
  11.     top: 5px;
  12.     left: 5px;
  13.     z-index: 100001; /* Above WP toolbar */
  14. }
  15.  
  16.  
  17. #main-nav   {
  18.     width: 100%;
  19.     min-height: 50px;
  20.     background: #748d26 url('images/buttons-bg.png') repeat-x;
  21.     text-align: center;
  22.     //height: 50px; /* set to the height you want your menu to be */
  23. }
  24.  
  25. #main-nav ul    {
  26.     margin: 0; padding: 0; /* only needed if you have not done a CSS reset */
  27. }
  28. #main-nav li    {
  29.     display: block;
  30.     float: left;
  31.     line-height: 50px; /* this should be the same as your #main-nav height */
  32.     height: 50px; /* this should be the same as your #main-nav height */
  33.     margin: 0; padding: 0; /* only needed if you don't have a reset */
  34.     position: relative; /* this is needed in order to position sub menus */
  35. }
  36. #main-nav li a {
  37.     display: block;
  38.     height: 50px;
  39.     line-height: 50px;
  40.     padding: 0 10px;
  41.     color: #fff;
  42.     font-size: 0.95em;
  43.     font-weight: 700;
  44.     text-decoration: none;
  45.     text-transform: uppercase;
  46.  
  47. }
  48.  
  49. #main-nav li:hover > a { color:#4e620f;}
  50.  
  51. #main-nav ul ul { /* this targets all sub menus */
  52.     display: none; /* hide all sub menus from view */
  53.     position: absolute;
  54.     top: 35px; /* this should be the same height as the top level menu -- height + padding + borders */
  55. }
  56. #main-nav ul ul li { /* this targets all submenu items */
  57.     float: none; /* overwriting our float up above */
  58.     width: 200px; /* set to the width you want your sub menus to be. This needs to match the value we set below */
  59.     z-index: 50000;
  60.     color: #000;
  61.     background: #748d26;
  62.     text-transform: lowercase;
  63.     border-bottom: 1px solid #5f751b;
  64.     font-size: 0.8em;
  65. }
  66. #main-nav ul ul li a { /* target all sub menu item links */
  67.     padding: 5px 10px; /* give our sub menu links a nice button feel */
  68.     height: auto;
  69. }
  70.  
  71. #main-nav ul li:hover > ul {
  72.     display: block; /* show sub menus when hovering over a parent */
  73. }
  74.  
  75.  
  76. #main-nav ul ul li ul {
  77.     /* target all second, third, and deeper level sub menus */
  78.     left: 150px; /* this needs to match the sub menu width set above -- width + padding + borders */
  79.     top: 0; /* this ensures the sub menu starts in line with its parent item */
  80. }
  81.  
  82.  
  83. #main-nav .current_page_item > a,
  84. #main-nav .current_page_ancestor > a,
  85. #main-nav .current_page_parent > a {
  86.     color: #4e620f;
  87.     font-weight: bold;
  88. }
  89.  
  90.  
  91. #main-nav li.first {
  92.     background: url(images/home.png) no-repeat center 12px;
  93.     margin: 0 10px;
  94. }
  95.  
  96. #main-nav li.first:hover {background: url(images/home-hover.png) no-repeat center 12px;}
Advertisement
Add Comment
Please, Sign In to add comment