I'm currently working on an application where I need to change a Label element if another DIV is visible.
I have this structure:
<label class="searchbox">
<input type="text" />
</label>
<div class="results">Hidden Div with results of search</div>
And this CSS:
.searchbox {
background-color: red;
}
.results {
display: none;
}
My challenge is... I need to change the background-color of .searchbox label if the input if focused and the .results class is not hidden.
If the user clicks outsite the results box, then box will be closed but the input still typed with the original background-color.
And I dont have access to change the JS or html right now, only the CSS.