I'm using Drupal 6, working on converting my static HTML and CSS files into a Drupal theme. So far most has gone well. How would I theme the search form though for a Drupal 6 theme?
What I'm confused on is, do I use the template.php
file in conjunction with the
search-theme-form.tpl.php
file? Can I import my style.css
sheet in the search-theme-form.tpl.php
file? or can I actually just paste in my CSS directly?
I've uploaded the search box here so you can see how it behaves and looks. http://nside-elite.techiedesign.net/testsearchform/testsearchform.html
Here is my original CSS:
#searchwrap {
width: 330px;
height: 51px;
margin-right: auto;
position: relative;
margin-left: auto;
top: 150px;
}
#searchboxwrapper {
height: 28px;
float: left;
width: 277px;
}
#searchbuttonwrapper {
width: 53px;
height: 28px;
float: right;
}
.preload {
position: absolute;
top: 0px;
left: 0px;
width: 1px;
height: 1px;
visibility: hidden;
overflow: hidden;
}
.searchbox {
background-position: top;
background-color: #515151;
background-image: url('Images/searchbox-shadow.png');
border: 2px #333333 solid;
outline: none;
background-repeat: repeat-x;
height: 20px;
margin-right: 3px;
float: right;
margin-top: 1px;
width: 250px;
text-indent: 5px;
font-size: 10pt;
color: #1D1D1D;
font-style: italic;
font-family: Arial;
}
.searchbutton {
background: url('Images/go-button.png');
background-repeat: no-repeat;
cursor: pointer;
width: 53px;
height: 28px;
border: 0px;
}
.searchbutton:hover {
background: url('Images/go-button-gifsmooth.gif');
background-repeat: no-repeat;
border: 0px;
}
.searchbutton:active {
background: url('Images/go-button-pressed.png');
background-repeat:no-repeat;
border: 0px;
}
.searchbox:focus {
border: 2px;
border-color: #6B6B6B;
border-style: solid;
}
And HTML:
<div id="searchboxwrapper">
<input name="Text1" type="text" class="searchbox" value="Search Nside Elite" onfocus="if(this.value == 'Search Nside Elite'){this.value = '';this.style.fontStyle='normal';this.style.color='#BFBFBF';}" onblur="if(this.value == '') {this.value='Search Nside Elite';this.style.fontStyle='italic';this.style.color='#222222'}" />
</div>
<div id="searchbuttonwrapper">
<input name="searchbutton" type="button" value="" title="Search" class="searchbutton" />
</div>
No one at the Drupal forums would give me the time of day. I'd appreciate any help you can offer. I'm not familiar with PHP.
Thanks!