Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2014
    Location
    United Kingdom
    Posts
    7
    Plugin Contributions
    0

    Default Aligning Search box & button

    Hi everyone,

    Im having some trouble aligning my header search box with the css search button.

    I think the problem Im having is that because my PHP skills are weak, I don't know where or how to insert an ID for the search button to allow me to add my CSS.

    Below is the php code.

    PHP Code:
    ...
    if (
    strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes') {
        
    $content .= zen_draw_input_field('keyword''''id="searchbar" size="6" maxlength="30" 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" class="search-header-box" maxlength="30" 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,HEADER_SEARCH_BUTTON);
      }

      
    $content .= "</form>";
    ?> 
    Here is the link to my site. http://www.digitalinx.co.uk/online/

    help appreciated - Thanks!

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Aligning Search box & button

    You could add something like this to the stylesheet:

    .button_search {margin: -.5em 0 0 0;}

  3. #3
    Join Date
    Jan 2014
    Location
    United Kingdom
    Posts
    7
    Plugin Contributions
    0

    Default Re: Aligning Search box & button

    thanks mate, yeah that has straightened it up.

    and using a little \9 hack it also looks straight in IE now too, as it was all over the place!

 

 

Similar Threads

  1. top search text box and search button not vertically aligned
    By HeyIts007 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 16 Oct 2010, 05:29 AM
  2. Aligning Quantity Box and Add to Cart Button
    By eyal8r in forum General Questions
    Replies: 14
    Last Post: 24 Feb 2010, 04:32 AM
  3. Firefox & IE - Product Text Box Not Aligning Properly
    By JGiacchi in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 19 Oct 2008, 08:13 PM
  4. button links not aligning properly in side category box
    By dellvostro in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 16 Oct 2008, 08:45 PM
  5. Moving 'add to cart' button & aligning attribute drop-downs
    By rlfreshwater in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 14 Sep 2008, 12:34 PM

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