I have implemented a search button onto my index.html but every time I hit enter on a search the page just refreshes and doesn’t search the correct term or similar terms.


    <input type="text" name="search" placeholder="Search Content...">

CSS snippet

/*SEARCH BAR - MAIN PAGE - START--------------------------------------------------------------------------- */
input[type=text] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 1.5px;
  font-size: 20px;
  background-color: #F3F3F3;
  background-image: 'searchicon.png';
  background-position: 10px 10px; 
  background-repeat: no-repeat;
  padding: 12px 20px 12px 40px;
/*SEARCH BAR END--------------------------------------------------------------------------- */

Thank you, any help would be much appreciated.

New contributor

Arun Dray is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Khám phá các thẻ bài đăng