WordPress.org

Ready to get started?Download WordPress

Forums

Placement of my Google Search box in header (3 posts)

  1. pstar
    Member
    Posted 5 years ago #

    I am having some trouble getting my Google Search Box. I need to get the box pushed over to the right side of header. It is now on the left side.

    This is my code, can someone tell me how this should look. Page is here

    <body>

    <div id="wrapper">

    <div id="header">
    <h1>/" id="logo"><?php bloginfo('name'); ?> <span><?php bloginfo('description'); ?></span></h1>
    <ul id="top-nav">

  2. /">Home
  3. <?php wp_list_pages('sort_column=menu_order&title_li=&depth=1' ); ?>

    <form action="http://www.google.com/cse" id="cse-search-box">
    <div>
    <input type="hidden" name="cx" value="005599680747266037974:wryjc97ddei" />
    <input type="hidden" name="ie" value="UTF-8" />
    <input type="text" name="q" size="31" />
    <input type="submit" name="sa" value="Search" />
    </div>
    </form>
    <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script>
    <div id="nav"><div>

    • <b>Categories:</b>
    • <?php wp_list_categories('show_count=0&title_li='); ?>
      <li class="feedburner">
      <? if(infostream_feed_burner_code()): ?>
      <?= infostream_feed_burner_code(); ?>
      <? endif; ?>

    </div></div>
    <div id="adv">
    <? if($infostream_adsense = get_option('infostream_adsense')): ?>
    <?= $infostream_adsense; ?>
    <? else: ?>
    <img src="<?php bloginfo('stylesheet_directory'); ?>/i/adv.gif" alt="" width="468" height="60" />
    <? endif; ?>
    </div>
    </div>

    <div id="container">

    <div id="content">
    <div id="text">`

  4. buddha trance
    Member
    Posted 5 years ago #

    Add this to your theme's style.css

    #cse-search-box {
    float: right;
    margin-top: -15px;
    }

    I checked your html, and on your site it's fine.
    The one in this post has tags which are not closed properly.

  5. pstar
    Member
    Posted 5 years ago #

    perfect, thank you

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags