Hi Guys,

I have the piece of code below and somehow when I click on the input to type some test, the page reloads(refresh).

  <div id="searchi">
<form id="search_box" action="search.php">
    <input id="search" type="text" placeholder="Search products...">
    <input id="submit" type="submit" value="Search">
</form>
</div>

My css is as follow:

#search
{ 
  width: 270px; 
  padding: 4px; 
  font: 100% arial, sans-serif;
  height:30px;
   background-color: #f8f8f8;

    border-radius: 35px;    
    border-width: 0px;
    border-style: solid;
    border-color: #c4d9df #a4c3ca #83afb7;
  }

   #submit
{  background-color: #eaf8fc;
    background-image: linear-gradient(#fff, #d4e8ec);
    border-radius: 35px;    
    border-width: 1px;
    border-style: solid;
    border-color: #c4d9df #a4c3ca #83afb7;
  width: 50px; 
  padding: 4px; 
  font: 100% arial, sans-serif;}

  #search_box {
                margin-right: 150px;
               width:360px;
               height:40px;
               text-align:center;
                top: 25%;
    left: 35%;
    position: absolute;
     background-color:#f8f8f8;

    border-radius: 35px;    
    border-width: 1px;
    border-style: solid;
    border-color: #c4d9df #a4c3ca #83afb7;  
    overflow: hidden; /* Clear floats */    

}

Recommended Answers

All 5 Replies

Any JavaScript in your page?

No, there isn't any Javascript.

Can you post the entire page or is it online somewhere?

Ok, sorted!

My php include function was at teh wrong place.

So how did that have the effect it was having?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.