Hallo zusammen,
ich habe jetzt meine erste Seite mit Wordpress erstellt, und verzweifle daran, die google Suche richtig einzubinden, ohne einen hässlichen grauen rahmen.
So sieht der Code meiner google cse aus, die ich in die header.php eingebunden habe:
HTML
<div id='cse-search-form'></div>
<script src='//www.google.com/jsapi' type='text/javascript'></script>
<script type='text/javascript'>
google.load('search', '1', {language: 'de', style: google.loader.themes.V2_DEFAULT});
google.setOnLoadCallback(function() {
var customSearchOptions = {};
var orderByOptions = {};
orderByOptions['keys'] = [{label: 'Relevance', key: ''} , {label: 'Date', key: 'date'}];
customSearchOptions['enableOrderBy'] = true;
customSearchOptions['orderByOptions'] = orderByOptions;
var imageSearchOptions = {};
imageSearchOptions['layout'] = 'google.search.ImageSearch.LAYOUT_POPUP';
customSearchOptions['enableImageSearch'] = true;
var customSearchControl = new google.search.CustomSearchControl('meine_google_cse', customSearchOptions);
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
var options = new google.search.DrawOptions();
options.enableSearchboxOnly('https://www.google.com/cse?cx=meine_google_cse', null, true);
options.setAutoComplete(true);
customSearchControl.draw('cse-search-form', options);
}, true);
</script>
<style type='text/css'>
input.gsc-input, .gsc-input-box, .gsc-input-box-hover, .gsc-input-box-focus {
border-color: #d9d9d9;
}
input.gsc-search-button, input.gsc-search-button:hover, input.gsc-search-button:focus {
border-color: #cecece;
background-color: #cecece;
background-image: none;
filter: none;
}
</style>
Alles anzeigen
Wie kriege ich bloss den grauen Rahmen weg
Vielen Dank für die Hilfe.
Grüße
Raul