I have an input text box this is contained within a 'search' div used to
hold the background image. I want to use the onfocus property of that input
box to change the background property of the 'search' div when the user clicks into the search box.
How would I do this, I can get the background/color of the actual input box to change but cannot work out how to change the div which it is contained within?
#container form div.search {
background-image: url(searchbg.png);
width: 148px;
}
<form class="searchform" method="get" action="">
<div class="search">
<input name="find" maxlength="100" size="12" class="search" value="Search" type="text" id="search-form" />
</div>
</form>