Home › Forums › JavaScript › Google Custom Search issues
- This topic is empty.
-
AuthorPosts
-
September 14, 2013 at 2:58 am #150043
Kevin Mamaqi
ParticipantHello,
I’m developing a website right now and I’m using Google Custom Search and the new Bootstrap reset and grid system.
The problem here is with that the image of the GCS button, here you got an image and here is the codepen link isn’t displaying properly.
I’m stuck (and more after I use codepen), so any help would be appreciated.
Thanks.
September 14, 2013 at 3:09 am #150044georgearnall
ParticipantDid you want the image that big ? Basically, the image is too small to be stretched that large. You could just bump up the padding. Demo
Also your mockup doesn’t seem to have an icon ?
September 14, 2013 at 3:50 am #150047Kevin Mamaqi
ParticipantHello georgearnall,
My image isn’t a mockup is a pic of my website in localhost and no, I don’t wan’t the image so big, I just copied the code that I can see with firebug.
The code is loaded by google, so I only can override it.
Viewing your code I changed this and it works:
height: auto;
min-width: auto;Of course in my case adding
!important
after to override it.
Here is the link.Thank you.
PD: I still can’t understand why this happens.
September 14, 2013 at 5:04 am #150051georgearnall
ParticipantJust set up a CSE to test this and its working alright. It must be something you have changed in your settings so it might be worth taking a look.
The original styling for the image looks like this:
width: 13px;
height: 13px;
padding: 6px 27px;
min-width: 13px;
margin-top: 2px;(For some reason the block code format is not working)
September 21, 2013 at 5:56 am #150838Kevin Mamaqi
ParticipantHello again and sorry for the long time with no response.
I still have problems with Google CSE. I created a new one because I didn’t find the reason of the trouble and now everything is getting worst.
The site is now online (URL) and nothing appears, I really don’t know why.
The Google CSE is at the right of the menu.
Any ideas?
Thanks.
September 21, 2013 at 6:13 am #150840Paulie_D
MemberIt appears to be commented out in your HTML.
September 21, 2013 at 7:13 am #150850Kevin Mamaqi
ParticipantHi Paulie_D,
You are right, but this was the old searchform, I commented it. Now is only the new one and nothing appears.
September 21, 2013 at 8:29 am #150853Paulie_D
MemberSo where is the code for the new one in your HTML?
There’s this
<gcse:searchbox></gcse:searchbox>
Not sure what the heck that is.
However, my guess is that you are missing a script or something.
September 21, 2013 at 8:50 am #150857Kevin Mamaqi
ParticipantIs in the menu, at the right, but doesn’t display nothing and I don’t know why:
<div class="col-md-4 busqueda"> <script> (function() { var cx = 'partner-pub-CCCXXXCCCXXXCCCXXXCCC'; var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true; gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//www.google.com/cse/cse.js?cx=' + cx; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s); })(); </script> <gcse:searchbox></gcse:searchbox> </div>
September 21, 2013 at 8:54 am #150859Paulie_D
MemberIs that the ONLY script that is required?
On looking at the previous examples in this thread it look like 2 were needed.
Like this?
<script type="text/javascript" async="" src="http://www.google.com/cse/cse.js?cx=005461060208947989604:keuvkbpdcxu"></script>
September 21, 2013 at 9:21 am #150861Kevin Mamaqi
ParticipantYes, because the script that are you mentioning in the last comment is loading in the head of my site.
But I’m not very sure why.
September 21, 2013 at 9:51 am #150870Paulie_D
MemberI can only suggest you review the documentation on the mark-up need to create the search box etc.
This http://georgearnall.com/tests/ on inspection seems quite different from you have.
September 21, 2013 at 12:05 pm #150886Kevin Mamaqi
ParticipantI don’t know what is going wrong.
I had changed my Google CSE configuration and now is working.
I was using Two Columns option (in the design) and now I’m using Two Pages option, now it works.
-
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.