Advertisement
Guest User

Untitled

a guest
May 31st, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. /*add this code in your primary menu in functions.php. the code will look like*/
  2.  
  3. function register_menu() {
  4. register_nav_menu('secondary', __('Secondary Menu', 'framework'));
  5. }
  6.  
  7.  
  8. /*add this code in footer.php or where you want to show. you can change the CSS class or ID as per your stylesheet*/
  9.  
  10. <div class="main-menu-wrapper-footer">
  11. <div class="container">
  12. <div class="row">
  13. <div class="col-md-12">
  14. <nav class="navigation1">
  15. <?php wp_nav_menu( array( 'theme_location' => 'secondary', 'menu_class' => 'sf-menu', 'container' => '' ) ); ?>
  16. </nav>
  17. </div>
  18. </div>
  19. </div>
  20. </div>
  21.  
  22. /*the CSS i've used*/
  23.  
  24. .navigation1{
  25. height:50px;
  26. text-align:center;
  27. }
  28. .navigation1 > ul{
  29. margin:0;
  30. list-style-type:none;
  31. }
  32. .navigation1 > ul > li{
  33. float:left;
  34. font-size:15px;
  35. position:relative; left:25%;
  36. }
  37. .navigation1 > ul > li i{
  38. font-size:11px;
  39. margin-left:5px;
  40. }
  41. .navigation1 > ul > li > a{
  42. padding:15px 22px;
  43. display:block;
  44. text-decoration:none;
  45. border-right:1px solid rgba(0,0,0,.05); color:#fff;
  46. }
  47. .navigation1 > ul > li:first-child > a{
  48. border-left:1px solid rgba(0,0,0,.05);
  49. }
  50. .navigation1 ul > li:hover > a, .navigation1 ul > li.current_menu_item > a{
  51. border-top-width:3px;
  52. border-top-style:solid;
  53. padding:12px 22px 15px 22px;
  54. background:#fff; color:#000;
  55. }
  56. .navigation1 > ul > li ul{
  57. position:absolute;
  58. margin:0;
  59. list-style-type:none;
  60. top:100%;
  61. left:0;
  62. z-index:999;
  63. display:none;
  64. min-width:100%;
  65. height:auto;
  66. background:#fff;
  67. text-align:left;
  68. box-shadow:0 2px 2px rgba(0,0,0,.3);
  69. }
  70. .navigation1 > ul > li:hover ul{
  71. display:block;
  72. }
  73. .navigation1 > ul > li > ul li{
  74. line-height: normal;
  75. font-size:14px;
  76. position:relative;
  77. }
  78. .navigation1 > ul > li > ul li > a{
  79. display:block;
  80. padding:10px 25px;
  81. border-bottom:1px solid #f8f7f3;
  82. white-space:nowrap;
  83. text-decoration:none;
  84. }
  85. .navigation1 > ul > li > ul > li:hover > a, .navigation1 > ul > li > ul > li > ul > li:hover > a{
  86. text-decoration:none;
  87. padding:10px 25px;
  88. color:#fff;
  89. border-top:0;
  90. }
  91. .navigation1 > ul > li > ul li:last-child a{
  92. border-bottom:0;
  93. }
  94. .navigation1 > ul > li > ul li ul{
  95. margin:0;
  96. list-style-type:none;
  97. left:100%!important;
  98. top:0;
  99. min-width: inherit;
  100. position:absolute;
  101. box-shadow:0 2px 2px rgba(0,0,0,.3);
  102. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement