Forums

[resolved] Search Form is not visible on IE (9 posts)

  1. scegghy
    Member
    Posted 6 months ago #

    Hello!

    On my website http://www.scegghy.com i have the search form in the header. On Firefox it's ok but in IE i don't see the search form......

    Here my codes:

    Header.php:

    <body>

    <div id="wrapper">

    <div id="menu">

      <li class="page_item <?php if ( is_home() ) { ?>current_page_item<?php } ?>">/" title="Home">Home
      <?php wp_list_pages('sort_column=menu_order&depth=1&title_li=');?>
      <?php include (TEMPLATEPATH . '/searchform.php'); ?>

    </div>

    <div class="clear"></div>
    <div id="top">
    <?php include (TEMPLATEPATH . '/headbanner.php'); ?>
    </div>

    <div id="catmenucontainer">

    <div id="catmenu">

      <?php wp_list_categories('sort_column=name&title_li=&depth=4'); ?>

    </div>

    </div>

    style.css

    /* The Search */
    #search {
    height:17px;
    width:203px;
    margin: 15px 30px 0px 0px;
    background:#000000 url(images/search-bg.gif) no-repeat left;
    padding:5px 5px 10px 5px;
    width:250px;
    float: right;
    }
    #search form {
    margin: 0px;
    padding: 0;
    }

    #search fieldset {
    margin: 0;
    padding: 0;
    border: none;
    }

    #search p {
    margin: 0;
    font-size: 85%;
    }

    #s {
    margin-left:0px;
    float: left;
    width:130px;
    padding: 6px 2px 7px 5px;
    margin: -2px 10px 10px 15px;
    border:none;
    font: normal 100% "Tahoma", Arial, Helvetica, sans-serif;
    color:#000;
    background:transparent;

  2. lhoylhoy
    Member
    Posted 6 months ago #

    are you sure your filename is really searchform.php as indicated in your code?

  3. scegghy
    Member
    Posted 6 months ago #

    Yes, infact i see it with firefox

    here the searchform.php

    <div id="search">
    <form method="get" id="searchform" action="<?php bloginfo('home'); ?>" >
    <input id="s" type="text" name="s" value="<?php echo wp_specialchars($s, 1); ?>" />
    <input id="searchsubmit" type="submit" value="GO" />

    </form>

    </div>

  4. lhoylhoy
    Member
    Posted 6 months ago #

    i'm seeing it!

  5. scegghy
    Member
    Posted 6 months ago #

    ON IE?

  6. lhoylhoy
    Member
    Posted 6 months ago #

    yup i'm seeing it, you might have just have problems with own ie installation or setup.

  7. scegghy
    Member
    Posted 6 months ago #

    OK! Thanks!!!

  8. 11worth
    Member
    Posted 6 months ago #

    Hi,

    It looks like the searchform appears in IE8 (that's what I use), but isn't visible in compatability mode (for IE7 and below). You may have to continue further if you want IE7 compatiblity...

    I looked at the source code, and it appears the searchform <div id="search"> is wrapped in <div id="menu"><ul>, yet isn't an <li> element. The <ul> and <div id="menu"> closes after <div id="search">. This is invalid XHTML, since a <div> can't be inside a <ul> unless it's in an <li>. A W3c HTML validation check hits on this as well.

    There are a couple of ways you could go. For now, in header.php, try this:

    <body>
    
    <div id="wrapper">
    
    <div id="menu">
    
    <li class="page_item <?php if ( is_home() ) { ?>current_page_item<?php } ?>">/" title="Home">Home
    <?php wp_list_pages('sort_column=menu_order&depth=1&title_li=');?>
    <li><?php include (TEMPLATEPATH . '/searchform.php'); ?></li> /* changes made */
    </div>
    
    <div class="clear"></div>
    <div id="top">
    <?php include (TEMPLATEPATH . '/headbanner.php'); ?>
    </div>
    
    <div id="catmenucontainer">
    
    <div id="catmenu">
    
    <?php wp_list_categories('sort_column=name&title_li=&depth=4'); ?>
    </div>
    
    </div>

    Hopefully this helps...

  9. scegghy
    Member
    Posted 6 months ago #

    Thank you for your help! I write

      below <div id="menu"> and li /li only on searchform...it working!

      The code:

      <body>

      <div id="wrapper">

      <div id="menu">

        <li class="page_item <?php if ( is_home() ) { ?>current_page_item<?php } ?>">/" title="Home">Home
        <?php wp_list_pages('sort_column=menu_order&depth=1&title_li=');?>

      • <?php include (TEMPLATEPATH . '/searchform.php'); ?>

      </div>

      <div class="clear"></div>
      <div id="top">
      <?php include (TEMPLATEPATH . '/headbanner.php'); ?>
      </div>

      <div id="catmenucontainer">

      <div id="catmenu">

        <?php wp_list_categories('sort_column=name&title_li=&depth=4'); ?>

      </div>

      </div>

Reply

You must log in to post.

About this Topic

Tags

No tags yet.