WordPress.org

Ready to get started?Download WordPress

Forums

drop down menu css problems help please (3 posts)

  1. mia4kreativa
    Member
    Posted 3 years ago #

    i am trying to learn how to make dropdown menus,,, but i have a problem now with the horisontal menu as one hover over a list item in first level the second level appears nicely but it pushes the first level list items appart and i dont want that. can some one help??
    this is just a test thingy i am still trying tolearn as much as i can about WP
    http://www.kreativadesign.net/Barbro/
    the code in the ehader.php
    <div id="lista">
    <p>Below is the problem menu</p>

      <?php wp_page_menu( 'sort_column=menu_order' ); ?>

    </div>

    and the css

    #lista {
    clear: both;
    width:100%;
    }
    #lista ul li.pagenav h2{
    display:none;
    }
    #lista ul{
    width:100%;
    list-style-type:none;
    }
    #lista ul li{
    padding: 5px 5px;
    display:block;
    float: left;
    }
    #lista a:hover {
    background:#888;
    color:#fff;
    }
    #lista ul.children {
    display:none;
    margin: 0px -5px;
    width:10em;
    }
    #lista li ul.children a {
    color: green;
    }

    #lista li:hover ul ul, #lista li:hover ul ul ul, #lista li:hover ul ul ul ul {
    display:none;
    }
    #lista li:hover ul, #lista li li:hover ul, #lista li li li:hover ul, #lista li li li li:hover ul {
    display:block;

    }

    i hope for help Thanks

  2. Jaya
    Member
    Posted 3 years ago #

    Replace this

    #lista UL LI
    {
    	padding: 5px;
    	display: block;
    	float: left;
    }

    With this:

    #lista UL LI
    {
    	padding: 5px;
    	display: block;
    	float: left;
    	width: 100px;
    }
  3. mia4kreativa
    Member
    Posted 3 years ago #

    Thank you that works fine but then the spacing in between the first list items gets uneven hmm..

    next trouble is that wen the underorderd list appears the content moves down i would like to have that list just slide over the text
    something any one can help me with ?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.