WordPress footer menu floating with height of footer

I’m building a wordpress theme and I’m stuck on my footer menu.

I want to display the menu like this picture.

Read More

Footer menu design

The menu items contain sub menu items so the html is like this:

<ul>
    <li>
        Menu item 1
        <ul id="submenu">
            <li>
            sub menu item 1
            </li>

            <li>
            sub menu item etc
            </li>
        </ul>
    </li>

    <li>
        Menu item 2
        <ul id="submenu">
            <li>
            sub menu item 1
            </li>

            <li>
            sub menu item etc
            </li>
        </ul>
    </li>
</ul>

Like this it puts it vertical on top of each other of course, floating the li puts all the main menu items next to each other.

But what I have to make according to the design is that the main menu item gets to the next column when the div height runs out.

It has to be dynamic otherwise I would have used CSS selectors.

Something with javascript/jquery maybe?

Thanks.

I didn’t think it would be relevant but here is the CSS I currently use which just floats the items left

.sub-menu .menu-item {
    margin-top: 0!important;
    clear: both;
    margin-right: 0; 
}
#lastfooter ul {
    padding-top: 8px;
}

#lastfooter ul li {
    float: left;
    margin-right: 15px;
}

#lastfooter ul li a{
    color: #000;
    text-decoration: none;
}

#lastfooter ul li a:hover{
    color: #e74d25;
}

Related posts

Leave a Reply

2 comments

  1. You have to manage these with CSS. Try the below code:

    .fl { float:left;}
    #footer {
        width:100%;
        background-color:#f3f3f3;
        border-radius:5px;
        -moz-border-radius:5px;
        -o-border-radius:5px;
        -webkit-border-radius:5px;
        padding:5px;
    }
    #footer .footer  {
        border:dashed 2px #ccc;
        border-radius:3px;
        -moz-border-radius:3px;
        -o-border-radius:3px;
        -webkit-border-radius:3px;
        padding:5px;
    }
    #footer .footer ul {
        padding:0px;
        margin:0px;
        width:170px;
        margin:5px 10px 5px 10px;
    }
    #footer .footer ul .listing_head {
        color:#000;
        font-weight:bold;
        font-size:13px;
    }
    #footer .footer ul li {
        list-style:none;
        display:block;
        line-height:22px;
        font-size:12px;
    }
    #footer .footer ul li a {
        color:#0152ab;
        text-decoration:none;
    }
    #footer .footer ul .feedback {
        font-size:19px;
        font-weight:bold;
        color:#375078;
    }
    #footer .footer ul .feedback_form label {
        font-size:13px; 
        color:#000;
        font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif;
    }
    #footer .footer ul .feedback_form label span {
        color:#900;
    }
    #footer .footer ul .feedback_form input[type="text"], #footer .footer ul .feedback_form textarea {
        width:180px;
        border: 1px #b7b4b4 solid;
        min-height:22px;
        padding:2px;
        color:#5a5858;
        background-color:#cccccc;
    }
    #footer .footer ul .feedback_form input[type="submit"]{
        height:29px;
        color:#900;
        background-color:transparent;
        border:0px;
        float:right;
        padding:0px;
        font-size:17px;
        cursor:pointer;
    }
    

    http://jsfiddle.net/sushilkandola/82HHJ/