Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2007
    Posts
    147
    Plugin Contributions
    0

    Default Search And Go button styling

    Can anyone tell me how I can get my "go" button to fit alongside the search box? (on the right hand side)

    Site is here.

    Thanks in advance!

  2. #2
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Search And Go!

    Looks to me like the width of the Go button added to the width of the search field (don't forget there's a margin around each of them) is just too much for the sidebox width minus any padding it has. So get thee hence to the stylesheet and adjust margins as needed. ;-)

    You may need to break out their definitions in the stylesheet if they're ganged up with other elements.

    Rob

  3. #3
    Join Date
    Jan 2007
    Posts
    147
    Plugin Contributions
    0

    Default Re: Search And Go!

    Er, thanks, I think? Sorry to be a pain, but I'm still not sure which margins I edit? Or is it the padding I edit?

  4. #4
    Join Date
    Aug 2006
    Location
    UK
    Posts
    449
    Plugin Contributions
    0

    Default Re: Search And Go!

    there is a <br> tag in the sidebox - tpl_search.php template.... that will need removing, then a little CSS change to get it to fit...
    ~Steve~

  5. #5
    Join Date
    Jan 2007
    Posts
    147
    Plugin Contributions
    0

    Default Re: Search And Go!

    Hi, it's proving to be quite the challenge. :) Thanks, I'll try to work it out.

  6. #6
    Join Date
    Aug 2006
    Location
    UK
    Posts
    449
    Plugin Contributions
    0

    Default Re: Search And Go!

    You need to edit a template file;
    includes - templates - YOURTEMPLATE - sideboxes - tpl_search.php

    and look for the following code;

    PHP Code:
      } else {
        
    $content .= zen_draw_input_field('keyword''''size="18" maxlength="100" style="width: ' . ($column_width-30) . 'px" 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 '\';"') . '<br /><input type="submit" value="' HEADER_SEARCH_BUTTON '" style="width: 50px" />';
        
    $content .= '<br /><a href="' zen_href_link(FILENAME_ADVANCED_SEARCH) . '">' BOX_SEARCH_ADVANCED_SEARCH '</a>';
      } 

    in the middle of the above code is this line - with a <br /> tag that needs removing;

    this.value = \'' . HEADER_SEARCH_DEFAULT_TEXT . '\';"') . '<br /><input type="submit" value="' . HEADER_SEARCH_BUTTON

    hope this is a better explanation for you...
    ~Steve~

  7. #7
    Join Date
    Jan 2007
    Posts
    147
    Plugin Contributions
    0

    Default Re: Search And Go button styling

    Thanks for that. Initially I removed all the BRs cause I didn't know which one it was, lol. Anyway, I have now only removed the one you pointed out to me. Because it's still on separate lines, I now have to work out which part of the css I have to tweak.

  8. #8
    Join Date
    Aug 2006
    Location
    UK
    Posts
    449
    Plugin Contributions
    0

    Default Re: Search And Go button styling

    insert this into your stylesheet.css

    #searchContent .search {width:40%;}
    ~Steve~

  9. #9
    Join Date
    Jan 2007
    Posts
    147
    Plugin Contributions
    0

    Default Re: Search And Go button styling

    I could just about hug you!

    THANKS! I really have no idea in general. I'm pretty much guessing my way through my edits, hehe - just trying to build the shop quickly so I can concentrate on products and the business! Yikes!

    Thanks again!

 

 

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. Search (and submit) CSS button
    By scrap in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 26 Jan 2010, 01:17 PM
  3. Search Box and Button
    By Nick1973 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 17 Oct 2008, 05:24 AM

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