Positioning Menu item inline with all other items

I am working on the Book Now button in the main navigation here:
http://www.rubitours.com/

Basically all the other nav items have a subtile. Some you can see and some that are a non breaking space. This allows them all to line up. Since they have transparent backgrounds it does not matter.

Read More

I don’t want a subtitle on the Book Now button and if I leave a blank space it make a noticable green area under the words Book Now. We want the button to look like it does right now but to be lined up more with the other nav items (Home, About, etc.) leaving the space below in red.

I have tried this with a negative top margin (which does nothing) and a bottom margin, which just pushes down the red below the whole nav bar.

Can anyone help me position this item correctly?

HTML:

 <div id="menu_wrapper">
    <!--Other Header Content -->
    <div id="menu_border_wrapper" style="display: block;">
        <div class="menu-main-menu-container">
            <ul class="nav" id="main_menu">
                <li class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-14 current_page_item" id="menu-item-27"><a href="http://www.rubitours.com/"><span><strong>Home</strong><span>&nbsp;</span></span></a></li>
                <li class="menu-item menu-item-type-post_type menu-item-object-page" id="menu-item-812"><a href="http://www.rubitours.com/virginia-city-tour/"><span><strong>Virginia City</strong><span>Tours &amp; Desctiption</span></span></a></li>
                <li class="menu-item menu-item-type-post_type menu-item-object-page" id="menu-item-1002"><a href="http://www.rubitours.com/genoa-lake-tahoe-tour/"><span><strong>Genoa Tour</strong><span>via Lake Tahoe, NV</span></span></a></li>
                <li class="menu-item menu-item-type-post_type menu-item-object-page" id="menu-item-1110"><a href="http://www.rubitours.com/reno-nv-sights-lights-jeep-tour/"><span><strong>Sights &amp; Lights</strong><span>Reno City Tour</span></span></a></li>
                <li class="menu-item menu-item-type-post_type menu-item-object-page" id="menu-item-24"><a href="http://www.rubitours.com/about-us/"><span><strong>About Us</strong><span>&nbsp;</span></span></a></li>
       <!--Button in question is below -->
       <li class="book_btn menu-item menu-item-type-custom menu-item-object-custom" id="menu-item-1047"><a href="http://www.rubitours.com/tours/"><span><strong>Book Now</strong></span></a></li>
                <li class="mobile-only menu-item menu-item-type-custom menu-item-object-custom" id="menu-item-1050"><a href="http://www.rubitours.com/?s="><span><strong>Search</strong></span></a></li>
            </ul>
        </div>                      
    </div>
    </div>

CSS (doesn’t work)

#menu_wrapper div .nav li.book_btn {
    margin-top:-20px;
}

Related posts

2 comments

  1. I added float: left; to #menu_wrapper .nav ul li, #menu_wrapper div .nav li and removed the -20px from #menu_wrapper div .nav li.book_btn and it worked exactly as you described.

  2. Try this:

    li.book_btn {
    vertical-align: middle;
    }

    Note: the vertical-align property works well when elements have display: inline-block, which the li elements in the nav already have from your other CSS rules.

Comments are closed.