Try add in your style.css file:
.widget_search {
margin-top: 3px;
}
And to style the input button, add styles to the following class as such:
.widget_search #searchsubmit {
/* your styles here like: */
background: #fff;
color: #222;
}
Thank you the top margin worked… Now I am going to try and the submit button!
Maybe you can help me with one more css problem…
I wanted to add a image behind the widget titles like a ribbon or something but it ends up covering the whole widget section instead of each title. Ideas?
I was trying it doing #primary #Secondary am I just missing the no-repeat?
Thanks!
Oh and is there a way to add some text in the search field: like “search this website” so it will appear before they enter anything?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
I wanted to add a image behind the widget titles like a ribbon or something but it ends up covering the whole widget section instead of each title. Ideas?
Apply the backgrounds to this CSS selector
.widget-title
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Oh and is there a way to add some text in the search field: like “search this website” so it will appear before they enter anything?
Yes, use the value
attribute on the input
field.
E.g
<input type="text" value="search this website" />
You may also want some JavaScript to clear the text on-click of the field. If so, use this attribute within the same input;
onclick="this.value='';"
Example at http://www.erummunir.com/240/clear-text-on-input-field-on-click
I have fog brain. where do I find the input field…. I have been looking all over and can’t find it!
<input type=”text” name=”search” onclick=”this.value=”;” onfocus=”this.select()” onblur=”this.value=!this.value?’search this website’:this.value;” value=”search this website” />
Edit this input field in sidebar.php template of your theme.