Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Problem with Google Custom Search

    I'm having an issue with my Google Custom Search interface on my site, www.besttvoptions.com where the Google image is showing in the search box (as it should be) and also showing in Search button underneath the word search. I can't figure out why or how to fix it. Has anyone seen this or know who I can fix it? Below is my code from google:

    Code:
    <form action="http://www.besttvoptions.com/searchresutls.html" id="cse-search-box">
      <div>
        <input type="hidden" name="cx" value="partner-pub-1747XXXXXXXXXXXXXXXXXXXXXXXXXXdv" />
        <input type="hidden" name="cof" value="FORID:11" />
        <input type="hidden" name="ie" value="ISO-8859-1" />
        <input type="text" name="q" size="25" />
        <input type="submit" name="sa" value=" Search" />
      </div>
    </form>
    <script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"></script>
    Last edited by besttvoptions; 01-16-2011 at 12:48 PM. Reason: added resolved to title

  • #2
    Senior Coder DJCMBear's Avatar
    Join Date
    Mar 2010
    Location
    United Kindom
    Posts
    1,173
    Thanks
    14
    Thanked 136 Times in 136 Posts
    Try doing this...
    Code:
    /* Google SEARCH */
    	#search {font-weight:bold;position:absolute;top:10px;right:170px;left:auto;width:22em} 
    	#search form {margin:0}
    	#search input {background-image: url('http://www.google.com/coop/intl/en/images/google_custom_search_watermark.gif'); background-repeat:no-repeat;  width:auto;margin: 0 0 -1px;height:1.7em}
            #search input[type="submit"] {background-image:none;}
    	#search label {padding:5px 0 0;display:inline}
    	#search input.f-submit {width:auto;font-size:%99;margin:0 0 -.15em;height:2.95em}
    Last edited by DJCMBear; 01-16-2011 at 10:41 AM.
    Official BinPress hand picked coder.
    For anyone worried about SQL injection go have a look at my small yet powerful script here.
    Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
    I am 1 of 65,608 people to get a Pebble Watch :P

  • Users who have thanked DJCMBear for this post:

    besttvoptions (01-16-2011)

  • #3
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks DJCMBear. That cleared it right up. For some reason it never occurred to me that the problem could have been with the css.

  • #4
    Senior Coder DJCMBear's Avatar
    Join Date
    Mar 2010
    Location
    United Kindom
    Posts
    1,173
    Thanks
    14
    Thanked 136 Times in 136 Posts
    The reason it was doing that is because both the textbox and the submit button are both inputs and you are setting the background image for #search input which indicates both of those.
    Official BinPress hand picked coder.
    For anyone worried about SQL injection go have a look at my small yet powerful script here.
    Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
    I am 1 of 65,608 people to get a Pebble Watch :P

  • #5
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Ahh, I thought it almost looked kind of cool with the 'Google' image in the search button but it was really more distracting than anything else. Thanks for clearing everything up for me.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •