Customize search block in frontpage I am using Zen3 theme , i created a subtheme ,i want have a big search box in front page , for doing this , i created  a front page template page--front.tpl.php.
also i added a custom css to my search-box by this code in template.php

function myrtheme_form_search_block_form_alter(&amp;$form, &amp;$form_state) {
    $form['actions']['submit'] = array('#type' =&gt; 'image_button', '#src' =&gt; base_path() . path_to_theme() . '/images/search-icon.png');
    $form['actions']['submit']['#attributes']['class'][] = 'search-icon';
    $form['search_block_form']['#attributes']['class'][] = 'search-box';
    }


my problem is how can add css class only to the frontpage in page--front.tpl.php.
I suggest you use drupal_is_front_page() to check it is on front page or not. You can achieve it using code similar to the following.

function myrtheme_form_search_block_form_alter(&amp;$form, &amp;$form_state) {
  $form['actions']['submit'] = array('#type' =&gt; 'image_button', '#src' =&gt; base_path() . path_to_theme() . '/images/search-icon.png');
  if (drupal_is_front_page()) {
    $form['actions']['submit']['#attributes']['class'][] = 'fpage-search-icon';
    $form['search_block_form']['#attributes']['class'][] = 'fpage-search-box';
  }
  else {
    $form['actions']['submit']['#attributes']['class'][] = 'other-page-search-icon';
    $form['search_block_form']['#attributes']['class'][] = 'other-page-search-box';
  }
}