Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2011
    Location
    West Yorkshire - England
    Posts
    38
    Plugin Contributions
    1

    Default Alter search button (css) width

    Afternoon all

    http://test.italianhampers.co.uk

    I have altered the search toolbar in my site header to use the label "Go!" instead of the word "Search", however, the button is still the same width as previously set.

    I set up a style in my stylesheet_css_buttons.css file as per

    Code:
    .button_search{width:33px;}
    But if you look at my site, you can see this is being overridden by something else making it 80px (see attached screenshot with chrome "inspect element" enabled)

    Name:  css.jpg
Views: 191
Size:  52.3 KB

    Can anyone tell me how to avoid this CSS conflict and make the button 33px?
    Last edited by mi16chap; 4 Jun 2012 at 06:21 PM. Reason: Forgot to include link to my site.

  2. #2
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Alter search button (css) width

    .button_search{width:33px!important;}

  3. #3
    Join Date
    Oct 2011
    Location
    West Yorkshire - England
    Posts
    38
    Plugin Contributions
    1

    Default Re: Alter search button (css) width

    That seems to be forcing it to override and display how I would like.

    Thanks for your input/help.

    Andy

  4. #4
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,159
    Plugin Contributions
    11

    Default Re: Alter search button (css) width

    Also, when you see element.style, it tells you that the value is hard-coded in some file.
    If you did not have the option of using button.search, you would need to find the file using (using the Developer's Toolkit) and change the value there UNLESS the style is in a single-use class or id.
    This particular style is in an input class that is used often throughout ZC. If it were in a class called inputSearch that were only used once, you could also use input.inputSearch {width:33px!important}

  5. #5
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Alter search button (css) width

    default file where it would be hard coded is in:

    /includes/templates/template_default/sideboxes/tpl_search_header.php

    or

    /includes/templates/YOUR_TEMPLATE/sideboxes/tpl_search_header.php

  6. #6
    Join Date
    Oct 2011
    Location
    West Yorkshire - England
    Posts
    38
    Plugin Contributions
    1

    Default Re: Alter search button (css) width

    I was not sure if starting a new topic is necessary here, but I am after one last tweak with the search tool.

    When you log into my site, the links across the top of the page display the "My account" and "log Out" urls, which are hidden unless you log in.

    As the log in/ log out links change, the search bar moves around slightly

    I cant find the correct combo of css to make the search tool align itself to the right of the black strip at top of my page (instead, I think it is floating to left of the last link)

    Anyone got a clue how to achieve this?

  7. #7
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Alter search button (css) width

    find

    .navMainSearch {
    margin:0 10px 0 0;
    line-height:0;
    float:right;
    }

    change to:
    #navMainSearch {
    margin:0 10px 0 0;
    line-height:0;
    float:right;
    }

  8. #8
    Join Date
    Oct 2011
    Location
    West Yorkshire - England
    Posts
    38
    Plugin Contributions
    1

    Default Re: Alter search button (css) width

    Thanks so much, I was messing with this for hours, and such a simple change!

  9. #9
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Alter search button (css) width

    glad this worked for you :-)

 

 

Similar Threads

  1. How can I make the Header Search button be a CSS button?
    By makehveli in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 26 Aug 2011, 03:01 AM
  2. Search Button Width
    By MortalWombat in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 7 Dec 2010, 04:42 AM
  3. Search button width
    By pulkit in forum Templates, Stylesheets, Page Layout
    Replies: 17
    Last Post: 15 Sep 2009, 05:54 PM
  4. CSS Confirm Order Button Width
    By nicko2 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 4 Sep 2008, 01:05 PM

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