Google custom search not showing correctly

Hi all

I just added Google Custom search to my site, and it’s not showing up correctly:

https://if-charts.000webhostapp.com/ifcharts.html

This is the code:

https://github.com/IF-Apps/IF-Charts/blob/master/ifcharts.html

Thanks in advance!

Still can’t firgure it out :sweat:. I tried redoing it, but did not work.

Have you tried playing around with tbody and td height?

1 Like

Where would I add that to here?

<script>
  (function() {
    var cx = '004454619546734881269:mrpeldorsvc';
    var gcse = document.createElement('script');
    gcse.type = 'text/javascript';
    gcse.async = true;
    gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(gcse, s);
  })();
</script>
<gcse:search></gcse:search>

:sweat_smile: hm. I see a js function and my brain goes blank. I was talking about the css. I though what you meant by “not showing properly” was that the input field seems a little offset.

[edit] because otherwise it seems to work?

1 Like

It seems to work, however, the field looks a little… ‘squished’

That’s what I want to fix.

Yes and that should be done in CSS, no? if so, check your Dev Tools and try fiddling around with the values?

1 Like

This doesn’t look like a common error. It may take some effort to debug.
You can refer these articles for help:

  1. https://blog.expertrec.com/google-custom-search-not-working/
  2. https://blog.expertrec.com/google-site-search-not-working-how-to-fix/
    You should be able to fix it from these steps if it is a GCS error. If not then it is likely to be an error on your website.