Results 1 to 7 of 7
  1. #1
    Join Date
    May 2010
    Location
    Cyberspace
    Posts
    376
    Plugin Contributions
    0

    Default header search-field

    I'm looking for a way to restrict the width of this element: #navMainSearch form[method="get"] located in tpl_search_header.php

    I've tried targeting the element with CSS and setting width to either a lower percentage or pixel value. It's not working great...

  2. #2
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: header search-field

    Is this what you are asking?
    Change Box Size in Search Box
    A. includes/ templates/ template_default/ sideboxes/ tpl_search_header.php
    When done place into the override structure of your site if you are using..

    B.includes/ templates/ override folder/ sideboxes/ tpl_search_header.php

    1. line 17
    2. width= 100 to 135
    3. line 19
    4. width = 100 to 135
    5. ftp the file
    Mark
    Hare Do

  3. #3
    Join Date
    May 2010
    Location
    Cyberspace
    Posts
    376
    Plugin Contributions
    0

    Default Re: header search-field

    Thanks! Didn't get the right hang of it so I'm posting my code here
    if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'no') {
    $content .= zen_draw_input_field('keyword', '', 'size="6" maxlength="30" style="" width="100 to 150" value="' . HEADER_SEARCH_DEFAULT_TEXT . '" onfocus="if (this.value == \'' . HEADER_SEARCH_DEFAULT_TEXT . '\') this.value = \'\';" onblur="if (this.value == \'\') this.value = \'' . HEADER_SEARCH_DEFAULT_TEXT . '\';"') . ' ' . zen_image_submit (BUTTON_IMAGE_SEARCH,HEADER_SEARCH_BUTTON);
    } else {
    $content .= zen_draw_input_field('keyword', '', 'size="6" maxlength="30" style="" width="100 to 150" value="' . HEADER_SEARCH_DEFAULT_TEXT . '" onfocus="if (this.value == \'' . HEADER_SEARCH_DEFAULT_TEXT . '\') this.value = \'\';" onblur="if (this.value == \'\') this.value = \'' . HEADER_SEARCH_DEFAULT_TEXT . '\';"') . '&nbsp;<input type="submit" value="' . HEADER_SEARCH_BUTTON . '" style="width: 45px" />';
    }
    www.test.soundfactory.nu

  4. #4
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: header search-field

    I see your problem..

    You have now this: width="100 to 150"

    What I meant is this:
    width="150"
    Mark
    Hare Do

  5. #5
    Join Date
    May 2010
    Location
    Cyberspace
    Posts
    376
    Plugin Contributions
    0

    Default Re: header search-field

    I have to write it like this: 'size="6" maxlength="30" style="width:150px" value="' otherwise I don't get any results/changes. The issue is with the form[method="get"] displaying out of the box (out of the green text field, the one containing the magnifying glass). It produces the unfavorable effect of pushing or forcing my search button further to the right instead of closer to the left (which is what I would like)...

  6. #6
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: header search-field

    Ok, change file back to it's original if this was not the right process.. Post a link please or Pm me the link... So I can view in Firefox with the add on called Firebug to see if we can control the spacing within the stylesheet.css
    Mark
    Hare Do

  7. #7
    Join Date
    May 2010
    Location
    Cyberspace
    Posts
    376
    Plugin Contributions
    0

    Default Re: header search-field

    Sure. Thanks! The link is: www.test.soundfactory.nu

 

 

Similar Threads

  1. v151 header search field not working - showing 0 results
    By noyloza in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 22 Feb 2013, 05:59 PM
  2. add search field to header and email subscribe to footer
    By noyloza in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 5 Nov 2012, 04:44 PM
  3. Remove (not turn off) Search Header Field
    By DBB1 in forum Templates, Stylesheets, Page Layout
    Replies: 16
    Last Post: 23 Dec 2011, 10:11 PM
  4. resize search field in header
    By Ivanna in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 5 Jul 2011, 09:06 PM
  5. Search Header Button and Text Field
    By swelter83 in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 14 Mar 2008, 02:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR