Support » Themes and Templates » Make searchbar one line

  • I followed this tutorial with no luck.. anyone have any idea why?

    First, instead of it being on 2 lines, with “Search” on a button below, how about making it one line only ?
    Add this to your wp-layout.css – it doesn’t matter where;
    form.searchform {display: inline;}
    Now edit your index.php, and you will see these lines;
    <form id=”searchform” method=”get” action=”<?php echo $PHP_SELF; ?>”>
    <div>
    <input type=”text” name=”s” id=”s” size=”15″ />
    <input type=”submit” name=”submit” value=”<?php _e(‘Go!’); ?>” />
    </div>
    and delete the
    that is in bold. That’s that done.

Viewing 4 replies - 1 through 4 (of 4 total)
  • 1. Since “searchform” is not a class but an id, your declaration should be:
    form#searchform {display: inline;}
    2. It’s possible the form will still wrap if the width of the div (or other element) it resides in is too small to fit the search field and button on one line.

    Zac – a link straight to your wp install would also result in help.

    Thread Starter Zac

    (@zac)

    ok thanks. it probably is that the width is wrong but i am slowly wrapping my mind around this css stuff. here is a link to the install:
    http://www.folkphotography.com/wp/

    #menu input#s {
    width: 60%; <————————-
    background: #eee;
    border: 1px solid #999;
    color: #000;
    }
    Changing the % works here 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Make searchbar one line’ is closed to new replies.