I have my search form enabled.
The block title of the search form however is disabled, or to say more precisely i put
in the block title, so the search form has no title.

But still just above the search block there is text saying "search this site".

How can i get rid of this text?

Comments

Rowanw’s picture

You can hide it with CSS.

Here's some CSS you can use:

#block-search-0 label {
  display: none;
}

Alternatively you could override the HTML and 'physically' remove the label, here's how.

--
How to override HTML in Drupal 6

held69’s picture

i tried the css part and it worked right away, thanks....

gaguillen’s picture

Thanks!...but where I have to put this CSS code? Yours, G

held69’s picture

sorry for reacting a bit late, i was out of town lately.

Open you style.css file. Just after the body part there is a search form block i just added the line in that block.

morehawes’s picture

I've just upgraded to Drupal 6.9 and used needed a slight alteration from the CSS above, I used the following rule to override and hide the text (in style.css for your theme):

#search-theme-form label {
  display: none;
}
svergeylen’s picture

It worked also for me (edit styles.css in your theme directory)
Thanks,
Stéphane

aharown07’s picture

To do it in zen-classic

#edit-search-theme-form-1-wrapper label {
display: none;
}

There's probably more than one place you can put it but at the end of zen-classic.css works fine

Just spent an hour figuring that out.

ferrangil’s picture

Hi,
for me, using a sub zen theme the css was:

  #edit-search-block-form-1-wrapper label {
    display: none;
}

so please use Firebug and locate the exact name of your div (this is for future reference!)

herojig’s picture

I am using a few themes, and also using Artisteer... thx for any advice

Phoenix.Consultants.Nepal (www.phoenixstudiosnepal.com)

MuddassirAhmad’s picture

I am new to drupal and I am making custom theme. I did the following steps till now. I am having html file with css which I want to use for my drupal site.

1. Made a folder in sites/all/themes/mytheme
2. paste the blue marine theme
3. I opened the file page.tpl.php and pasted my html code in it. Also altered scripts and style sheets as according to php .
4. I used styles.css and pasted my css classes in this.
5. The website turned into my tempelate. After that i took php code for old page.tpl.php and am now enterinf one by one. I entered logo code its working fine.
6. I entered search code and changed css classes and gave search button my own button. I used firebug and copied classes what drupal made.

My Problem: The problem am facing is that drupal search box is containing text "search this site" before textbox. I want to change this text for example "search products". Also the search button is also showing text on it.

Will somebody tell me from where we can change these static texts used in drupal.

Regards.

aharown07’s picture

Take a look at http://drupal.org/project/stringoverrides
Some strings don't work so I'm not sure about the search box.

Otherwise, the way to do it is read up on theme functions. It's a theme function thing.