Mobile app version of vmapp.org
Login or Join
Cofer257

: Google Custom Search layout problems When I install the custom search script on my page, the layout is broken. See the attached screenshot. I cut and pasted the following code: <script>

@Cofer257

Posted in: #GoogleCustomSearch

When I install the custom search script on my page, the layout is broken. See the attached 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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Cofer257

1 Comments

Sorted by latest first Latest Oldest Best

 

@Martha676

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;
}

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme