Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I install the custom search script on my page, the layout is broken. See the attached screenshot.

screenshot

I cut and pasted the following code:

<script>
  (function() {
    var cx = '000119385509173658979:1gb8nobc8-a';
    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>

It works but it looks screwed up. How can fix this?

share|improve this question
up vote 1 down vote accepted

Here's the CSS that fixed it:

.gsc-input-box { background: none !important; border: none !important; height: auto !important; }

.gsc-search-box .gsc-input>input:hover, .gsc-input-box-hover { border: none !important; }

.gsc-search-box .gsc-input>input:focus, .gsc-input-box-focus { border: none !important; }

.gsc-result .gs-title { line-height: 1.5em !important; }

input.gsc-input { border: 1px solid #d9d9d9 !important; }

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.