Results 1 to 7 of 7
  1. #1
    Join Date
    May 2010
    Location
    Cyberspace
    Posts
    387
    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,097
    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 - Does the rabbit beat Zen "never".
    Zen Cart 1.5.1 Update Release Need help Purchase the Book

  3. #3
    Join Date
    May 2010
    Location
    Cyberspace
    Posts
    387
    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,097
    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 - Does the rabbit beat Zen "never".
    Zen Cart 1.5.1 Update Release Need help Purchase the Book

  5. #5
    Join Date
    May 2010
    Location
    Cyberspace
    Posts
    387
    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,097
    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 - Does the rabbit beat Zen "never".
    Zen Cart 1.5.1 Update Release Need help Purchase the Book

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

    Default Re: header search-field

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

 

 

Similar Threads

  1. 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
  2. Remove 'Search by Date Added' field from advanced search page?
    By gaffettape in forum General Questions
    Replies: 7
    Last Post: 24 Jan 2010, 03:34 PM
  3. how can I expand the width of the search field amd search button?
    By watzursn in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 29 Sep 2009, 09:22 PM
  4. Search Field without the "Search Button" in the header
    By gems14k in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 26 Sep 2009, 08:56 AM
  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
  •