WordPress.org

Forums

horizontal header menu with a search field (6 posts)

  1. tronicscribe
    Member
    Posted 10 years ago #

    so I created a horizontal menu under my header which I found the how to from searching. but I wanted to remove the search field from the sidebar and place it in my menu on the right side. I thought I did everything correctly, which basicly was removing the code from the sidebar file and placing it in my menu list under the header file. here is the code I used:

    <div id="navmenu">

    <ul>
    <li><a>">HOME</a></li>
    <li><a href="#">EMPTY</a></li>
    <li><a href="#">EMPTY</a></li>
    <li><a href="#">EMPTY</a></li>
    <li><?php include (TEMPLATEPATH . '/searchform.php'); ?></li>
    </ul>
    </div>

    but for some reason the search field is under the menu rather than next in line of the list. did I do sometihng wrong? looky

  2. whooami
    Member
    Posted 10 years ago #

    Moving around items isnt that simple.. there are declarations inside style.css that control layout and presentation.

    for instance:

    /* Begin Form Elements */
    #searchform {
    margin: 10px auto;
    padding: 5px 3px;
    text-align: right;
    }

    rather than simply telling you what you need to do, I am going to recommend that you install firefox (if you havent already) and then go download the web developer extension for it @ http://chrispederick.com/work/webdeveloper/

    That will allow you to play with your stylesheet on the fly and see the changes in real time.

    I should add also that your browser has a view-source feature; if you have managed to create a list like you pasted above, and you know that to be the proper syntax, then viewing your source would tell you whether or not you have a style problem or something else. In other words, you know you made the list right -- so look at your source, and see if adding the search.php broke that. If it didnt then you just need to make simple style changes.

  3. tronicscribe
    Member
    Posted 10 years ago #

    thanks man!! I'm always up for figuring things out on my own. and its a big help to be pointed in the right direction.

  4. tronicscribe
    Member
    Posted 10 years ago #

    how can you tell by viewing the source if something is wrong?

  5. whooami
    Member
    Posted 10 years ago #

    Based on your first post, you created a list. heres some common troubleshooting tools for you:

    1. Do you know you made that list right? I assume you do.
    2. Look at your source:

    <ul>
    <li><a href="http://www.tronicscribe.com/metalherig">HOME</a></li>
    <li><a href="#">EMPTY</a></li>
    <li><a href="#">EMPTY</a></li>
    <li><a href="#">EMPTY</a></li>
    <li><form method="get" id="searchform" action="http://www.tronicscribe.com/metalherig/">

    <div><input type="text" value="" name="s" id="s" />
    <input type="submit" id="searchsubmit" value="Search" />
    </div>
    </form>
    </li>

    </ul>

    3. Did you break the list by adding the searchform? (y/n)

    4. If you didnt. then it must be a stylesheet thing, right?

  6. talgalili
    Member
    Posted 10 years ago #

    tronicscribe, you have a velidator in the firefox-plugin.

    And whooami - Help.

    My web site is:
    http://www.zeevgalili.com/

    I am also trying to put the search inline, and I can't seem to get it to work.
    What am I missing ?!

    Thanks allot,
    Tal.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags