Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

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.