WordPress Sub Pages as Dropdown menu by css
How to create subpages as Dropdown menu by css help in wordpress
To make a wordpress blog or Cms we need this a lot, even to make wordpress blog more user friendly, we require to add child pages (subpages) as dropdown. but as there not plugin i guess so many developer or site owners face problem. or hire developer to fix it.
Here we giving you very simple way to make a dropdown menu by css help. just you need to follow our steps and you are done !
Step 1
Css// add these in your theme css
/////////////////////////////////////
#nav, #nav ul{ Â padding: 0; Â float:left; Â list-style: none; } #nav a { Â font-size:12px;font-family:Arial, Tahoma, Verdana;line-height:34px;text-transform:uppercase;font-weight:700;color:#dfdfdf;display:block;margin-right:5px;text-decoration:none;padding:0 20px 0 20px } #nav li { Â float: left; Â line-height:27px;Â } #nav li a:hover { background: none; color:#50daf7; } #nav li ul { Â position: absolute; Â width: 15em; Â left: -999em; Â padding-top:0px; } #nav li:hover ul, #nav li.sfhover ul { Â left: auto; Â z-index:1000;Â } #nav li ul li { Â Â Â background: #000; Â border-bottom:1px solid #1e2527;Â Â border-left:1px solid #1e2527;Â Â border-right:1px solid #1e2527;Â Â Â Â line-height:18px;Â Â width:20em; }
////////////////////////
Step 2
now search your theme’s header/ sidebar to replace as below
<?php wp_list_pages(’title_li=’ ); ?>
and replace this to
<ul id=”nav”>
               <?php wp_list_pages(’title_li=’ ); ?>            Â
 </ul>
that is it
try and us know your comments and problems










November 30th, 2009 at 7:42 am
[...] http://www.w3cgallery.com/w3c-blog/wordpress-hack/wordpress-sub-pages-as-dropdown-menu-by-css [...]
December 7th, 2009 at 2:33 am
[...] this article: WordPress Sub Pages as Dropdown menu by css,Wordpress Hack-css … Рубрики Scripts Теги: make-wordpress « Page template suggestions for taxonomy [...]