How to make the search form without the search button?


Tags: css,drupal-7,search-form

Problem :

This question is related to CSS/HTML and drupal web development. I am developing website using Drupal 7. And by default Drupal provides the Search form (as shown in image) with input text box and button next to it. How can I remove the that search button and make it like just text input box, for example you can see the search form of stackoverflow. So by this there is no need for clicking the button, just write text and enter. Thanks

Drupal default search form

Note: Drupal is the content management system. And why I am asking this question here as solution is related to CSS/HTML.



Solution :

If you want to hide submit button but keep the auto submit on enter possibility you can just hide the submit button with css:

#edit-custom-search-blocks { //replace this selector with ID of your submit button
      position: absolute;
      top: -999px;
      left: -999px;
      width: 0px;
      height: 0px;
}

You can place it in your default CSS file. (then clear the Drupal cache)


    CSS Howto..

    How to add two images one in the right and other in the left side of the input textbox?

    Lazy loading images how

    how to set a table background image

    How can I achieve this transparency effect using css?

    How to create and manage large CSS projects?

    jQuery How to select the only child of a
  • inside a class
  • CSS/JQuery: how to create submenu for table row that stays visible mousing from row onto menu?

    How to prepend a number before an HTML H2 with CSS?

    CSS help, how to target this link inside of div

    How can I use :hover with multiple classes

    How to specify a CSS border on hover around thumbnails?

    How to do caption hover effect on a background?

    How to change dropdown submenu second level background?​

    How to center checkbox vertically in a table-cell?

    How to change the background colour's opacity in CSS [duplicate]

    How to style a UL/LI drop down

    How to make a div fill the height until the next absolutely positioned element

    How to make header/body/footer 'popup' div with variable height body?

    How to have div horizontally scroll when resized.

    How to use font-face with cssless?

    How do I wrap a long string in a fixed-width container with CSS?

    How to apply css, after Jquery adds a class?

    Align lists on showing or hiding

    If contains 'string' - set css “visibility:hidden;” - how to?

    How to properly apply CSS style to H elements in ordered list

    How to force a button inside a div not to inherit the parent CSS?

    How to create a “dot-dash” border with css or javascript?

    how to collapse navbar in twitter bootstrap after click on link if it woud be collapsed because of css? [closed]

    CSS: how to set the width of form control so they all have the same width?

    How can I make a DIV cursor and background color change if I hover over it?