WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm building a site using the twentytwelve theme. I need to add an input text box situation on the far left of the menu navigation bar. Here is the HTML from Header.php and the css from style.css.


<nav id="site-navigation" class="main-navigation" role="navigation">

        <h3 class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></h3>

        <a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentytwelve' ); ?>"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a>

        <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>

    </nav><!-- #site-navigation --


.main-navigation ul.nav-menu,
.main-navigation div.nav-menu > ul {
    border-bottom: 1px solid #000000;
    border-top: 1px solid #000000;
    display: inline-block !important;
    text-align: left;
    width: 100%;
    background-color: #000000;
    text-align: right;
    font-size: 50%;
    position: relative;
.main-navigation ul {
    margin: 0;
    text-indent: 0;

.main-navigation li a,
.main-navigation li {
    display: inline-block;
    text-decoration: none;

.main-navigation li a {
    font-size: 120%;
    font-family: 'calibri';
    border-bottom: 0;
    color: #ffffff;
    line-height: 3.692307692;
    text-transform: uppercase;
    white-space: nowrap;


Can anyone help me get an input text and form embedded into the nav bar? I'll use this for customers to give me their email address.

share|improve this question

Put input text tag and wordpress nav in a single div and give them float left and float right respectively. If working then ok or else try to adjust with width.

share|improve this answer
My menu bar takes up the width of the page. When I do this it shrinks way down – Stephen Sep 17 '13 at 20:19
So this solution doesn't put the input inside the menu bar, it puts it outside it on the left. – Stephen Sep 17 '13 at 20:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.