Forums

Make searchbar one line (5 posts)

  1. Zac
    Member
    Posted 7 years ago #

    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.

  2. Kafkaesqui
    Moderator
    Posted 7 years ago #

    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.

  3. Mark (podz)
    Support Maven
    Posted 7 years ago #

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

  4. Zac
    Member
    Posted 7 years ago #

    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/

  5. Mark (podz)
    Support Maven
    Posted 7 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.