Made my own menu with CSS – where to implement it in WP ?
-
So, after I thought a plugin running on javascript for a menu that somewhat met my wishes was making my site slow, I became dedicated to make my own menu in CSS. The CSS itself is not a real problem, what I haven’t found out is where to enter my css code so that it works for my single left sidebar (I added this menu to the left sidebar through the page ‘widgets’). I’m using the swift theme, should that matter.
If anyone could help on this it would be greatly appreciated!
I tried using this code in style.css since I want my menu to be dynamic (if I add a new page, a new button should be added to menu automatically)<ul id="menu"> <li <?php if(is_home()) { ?> class="current_page_item"< ?php } ?>> <a href="<?php bloginfo('home'); ?>">home</a></li> < ?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?> </ul>
but maybe I misunderstood it, since nothing happened.
this is my CSS, if it is of any use.
<ul id="menu"> <li <?php if(is_home()) { ?> class="current_page_item"< ?php } ?>> <a href="<?php bloginfo('home'); ?>">home</a></li> < ?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?> #primary-menu{ border-top: 1px solid #013d6c; border-right: 1px solid #013d6c; border-left: 1px solid #3D59b5;} #primary-menu ul li {margin: 0; padding: 0; border: none;} #primary-menu ul a {padding: 10px 10px 10px 15px; background: #3D59b5; text-decoration:none; display: block; color: #a0a0ff; border-bottom: 1px solid #7Da9e5; border-top: 1px solid #4695d3; font-family: Verdana, Helvetica , sans-serif ;} #primary-menu ul ul a {padding: 10px 10px 10px 25px;} #primary-menu ul a:hover {padding: 10px 10px 10px 15px; background-image: -webkit-linear-gradient(top, #2F2727, #1a82f7); background-image: -moz-linear-gradient(top, #2F2727, #1a82f7); background-image: -ms-linear-gradient(top, #2F2727, #1a82f7); background-image: -o-linear-gradient(top, #2F2727, #1a82f7);} } #primary-menu ul { background-image: -webkit-linear-gradient(top, #2F2727, #1a82f7); background-image: -moz-linear-gradient(top, #2F2727, #1a82f7); background-image: -ms-linear-gradient(top, #2F2727, #1a82f7); background-image: -o-linear-gradient(top, #2F2727, #1a82f7);} </ul>
- The topic ‘Made my own menu with CSS – where to implement it in WP ?’ is closed to new replies.