I’m trying to use my own CSS on the Google Search, but nothing I do stays. How can I put my own CSS on it? Is it trough the api, css, etc?
And whenever I made a change the whole of the page reload, but the ‘search box’ is reverted to its origin style.
API:
<script>
(function() {
var cx = '005780201047221652427:jopxospdjss';
var gcse = document.createElement('script');
gcse.type = 'text/javascript'; gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//www.google.co.uk/cse/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
I don’t know if I have to do the styling in JS or somewhere else.
Thank you for help
Many Thanks
You can try with below code…
You can try with your own css with following:-
For displaying search record, create a new file with name “search.html” and paste the below code there. Search records will display underneath this page.