Ready to get started?Download WordPress


Expanding Navigation Background (2 posts)

  1. noelgreen
    Posted 5 years ago #

    So I've got a menu that has a drop down on it. Each item is just the title of the page, some are longer titles than others. The navigation bars have a "curve" on either end of them... so, what I'm wanting to do is make them able to "expand" so that if the text is longer they will be longer, and if they're smaller they will be smaller... all without distorting them rounded edges.

    The way to do this would be to put a "div" on the front and end of each navigation li link.

    So, how do you do this?

    I'm thinking it would be something like:

    But, I don't know what those div parameters would be to add a div at the front, and different div at the end, of each li.


  2. noelgreen
    Posted 5 years ago #

    Here's the code I've got now... it's not working.
    Is this close?

    <?php wp_list_pages('title_li=<div id="menu_left"></div>' . __('') . '<div id="menu_right"></div>'); ?>

    And on my CSS I have this...

    #menu_left {
    background: transparent url('images/menu_left.png') no-repeat;
    height: 19px;
    width: 8px;
    #menu_right {
    background: transparent url('images/menu_right.png') no-repeat;
    height: 19px;
    width: 8px;

Topic Closed

This topic has been closed to new replies.

About this Topic